This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Making fold-const sane WRT symbol visibilities


> Jan Hubicka <hubicka@ucw.cz> writes:
> 
> > 	* cgraph.h (symtab_node): Add nonzero_address.
> > 	(decl_in_symtab_p): Break out from ...
> > 	(symtab_get_node): ... here.
> > 	* fold-const.c: Include cgraph.h
> > 	(tree_single_nonzero_warnv_p): Use symtab to determine
> > 	if symbol is non-zero.
> > 	* symtab.c (symtab_node::nonzero_address): New method.
> >
> > 	* gcc.dg/pr36901.h: Simplify because non-zero symbol folding no
> > 	longer happens during parsing.
> > 	* gcc.dg/pr44024.c: Update template.
> > 	* g++.dg/tree-ssa/nonzero-2.C: New testcase.
> > 	* g++.dg/tree-ssa/nonzero-1.C: New testcase.
> > 	* gcc.dg/tree-ssa/nonzero-1.c: New testcase.
> 
> FAIL: g++.dg/cpp0x/static_assert9.C  -std=c++11 (test for excess errors)
> Excess errors:
> /daten/aranym/gcc/gcc-20140714/gcc/testsuite/g++.dg/cpp0x/static_assert9.C:5:1: error: non-constant condition for static assertion
> /daten/aranym/gcc/gcc-20140714/gcc/testsuite/g++.dg/cpp0x/static_assert9.C:5:1: error: '(f != 0u)' is not a constant expression

Ah, sorry, missed this one.  I think the error is correct (based on earlier discussion we can
not really expect addresses of symbols to be non-NULL), so I would just update the testcase?

Honza
> 
> Andreas.
> 
> -- 
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]