Skip to content
Snippets Groups Projects
  • Richard Biener's avatar
    df49e460
    tree-optimization/109609 - correctly interpret arg size in fnspec · df49e460
    Richard Biener authored
    By majority vote and a hint from the API name which is
    arg_max_access_size_given_by_arg_p this interprets a memory access
    size specified as given as other argument such as for strncpy
    in the testcase which has "1cO313" as specifying the _maximum_
    size read/written rather than the exact size.  There are two
    uses interpreting it that way already and one differing.  The
    following adjusts the differing and clarifies the documentation.
    
    	PR tree-optimization/109609
    	* attr-fnspec.h (arg_max_access_size_given_by_arg_p):
    	Clarify semantics.
    	* tree-ssa-alias.cc (check_fnspec): Correctly interpret
    	the size given by arg_max_access_size_given_by_arg_p as
    	maximum, not exact, size.
    
    	* gcc.dg/torture/pr109609.c: New testcase.
    
    (cherry picked from commit e8d00353)
    df49e460
    History
    tree-optimization/109609 - correctly interpret arg size in fnspec
    Richard Biener authored
    By majority vote and a hint from the API name which is
    arg_max_access_size_given_by_arg_p this interprets a memory access
    size specified as given as other argument such as for strncpy
    in the testcase which has "1cO313" as specifying the _maximum_
    size read/written rather than the exact size.  There are two
    uses interpreting it that way already and one differing.  The
    following adjusts the differing and clarifies the documentation.
    
    	PR tree-optimization/109609
    	* attr-fnspec.h (arg_max_access_size_given_by_arg_p):
    	Clarify semantics.
    	* tree-ssa-alias.cc (check_fnspec): Correctly interpret
    	the size given by arg_max_access_size_given_by_arg_p as
    	maximum, not exact, size.
    
    	* gcc.dg/torture/pr109609.c: New testcase.
    
    (cherry picked from commit e8d00353)