Message ID | 538719BD.5080102@mentor.com |
---|---|
State | New |
Headers | show |
Tom de Vries <Tom_deVries@mentor.com> writes: > On 10-05-14 22:24, Richard Sandiford wrote: >> /* A set of flags on a symbol_ref that are, in some respects, redundant with >> information derivable from the tree decl associated with this symbol. >> @@ -1791,7 +1794,9 @@ #define SYMBOL_REF_CONSTANT(RTX) \ >> this information to avoid recomputing it. Finally, this allows space for >> the target to store more than one bit of information, as with >> SYMBOL_REF_FLAG. */ >> -#define SYMBOL_REF_FLAGS(RTX) X0INT ((RTX), 1) >> +#define SYMBOL_REF_FLAGS(RTX) \ >> + (RTL_FLAG_CHECK1 ("SYMBOL_REF_FLAGS", (RTX), SYMBOL_REF) \ >> + ->u2.symbol_ref_flags) >> > > Richard, > > with an arm-linux-gnueabi non-bootstrap build with --enable-checking=yes,rtl, I > ran into the following error: > ... > /home/vries/gcc_versions/devel/src/libgcc/libgcc2.c:819:1: internal compiler > error: RTL check: attempt to treat non-block symbol as a block symbol in > create_block_symbol, at varasm.c:394 > }; > ^ > 0xc3c16b rtl_check_failed_block_symbol(char const*, int, char const*) > /home/vries/gcc_versions/devel/src/gcc/rtl.c:844 > 0x103c09d create_block_symbol > /home/vries/gcc_versions/devel/src/gcc/varasm.c:394 > 0x103f42d make_decl_rtl(tree_node*) > /home/vries/gcc_versions/devel/src/gcc/varasm.c:1379 > 0x103fc87 notice_global_symbol(tree_node*) > /home/vries/gcc_versions/devel/src/gcc/varasm.c:1552 > 0x7588bf varpool_finalize_decl(tree_node*) > /home/vries/gcc_versions/devel/src/gcc/cgraphunit.c:823 > 0xb4eaa0 rest_of_decl_compilation(tree_node*, int, int) > /home/vries/gcc_versions/devel/src/gcc/passes.c:241 > 0x5902c4 finish_decl(tree_node*, unsigned int, tree_node*, tree_node*, tree_node*) > /home/vries/gcc_versions/devel/src/gcc/c/c-decl.c:4521 > 0x5e8586 c_parser_declaration_or_fndef > /home/vries/gcc_versions/devel/src/gcc/c/c-parser.c:1782 > 0x5e7644 c_parser_external_declaration > /home/vries/gcc_versions/devel/src/gcc/c/c-parser.c:1399 > 0x5e72c7 c_parser_translation_unit > /home/vries/gcc_versions/devel/src/gcc/c/c-parser.c:1286 > 0x606c6d c_parse_file() > /home/vries/gcc_versions/devel/src/gcc/c/c-parser.c:14077 > 0x66b7fa c_common_parse_file() > /home/vries/gcc_versions/devel/src/gcc/c-family/c-opts.c:1067 > Please submit a full bug report, > with preprocessed source if appropriate. > Please include the complete backtrace with any bug report. > See <http://gcc.gnu.org/bugs.html> for instructions. > ... > > It looks like BLOCK_SYMBOL_CHECK hasn't been updated. > > Patch below fixes it for me. OK for trunk if bootstrap on x86_64 succeeds? Can't really approve it, but it looks obviously correct to me. Thanks for the fix. Richard
On 05/29/14 05:27, Tom de Vries wrote: > On 10-05-14 22:24, Richard Sandiford wrote: >> /* A set of flags on a symbol_ref that are, in some respects, >> redundant with >> information derivable from the tree decl associated with this >> symbol. >> @@ -1791,7 +1794,9 @@ #define SYMBOL_REF_CONSTANT(RTX) \ >> this information to avoid recomputing it. Finally, this allows >> space for >> the target to store more than one bit of information, as with >> SYMBOL_REF_FLAG. */ >> -#define SYMBOL_REF_FLAGS(RTX) X0INT ((RTX), 1) >> +#define SYMBOL_REF_FLAGS(RTX) \ >> + (RTL_FLAG_CHECK1 ("SYMBOL_REF_FLAGS", (RTX), SYMBOL_REF) \ >> + ->u2.symbol_ref_flags) >> > > Richard, > > with an arm-linux-gnueabi non-bootstrap build with > --enable-checking=yes,rtl, I ran into the following error: > ... > /home/vries/gcc_versions/devel/src/libgcc/libgcc2.c:819:1: internal > compiler error: RTL check: attempt to treat non-block symbol as a block > symbol in create_block_symbol, at varasm.c:394 > }; > ^ > 0xc3c16b rtl_check_failed_block_symbol(char const*, int, char const*) > /home/vries/gcc_versions/devel/src/gcc/rtl.c:844 > 0x103c09d create_block_symbol > /home/vries/gcc_versions/devel/src/gcc/varasm.c:394 > 0x103f42d make_decl_rtl(tree_node*) > /home/vries/gcc_versions/devel/src/gcc/varasm.c:1379 > 0x103fc87 notice_global_symbol(tree_node*) > /home/vries/gcc_versions/devel/src/gcc/varasm.c:1552 > 0x7588bf varpool_finalize_decl(tree_node*) > /home/vries/gcc_versions/devel/src/gcc/cgraphunit.c:823 > 0xb4eaa0 rest_of_decl_compilation(tree_node*, int, int) > /home/vries/gcc_versions/devel/src/gcc/passes.c:241 > 0x5902c4 finish_decl(tree_node*, unsigned int, tree_node*, tree_node*, > tree_node*) > /home/vries/gcc_versions/devel/src/gcc/c/c-decl.c:4521 > 0x5e8586 c_parser_declaration_or_fndef > /home/vries/gcc_versions/devel/src/gcc/c/c-parser.c:1782 > 0x5e7644 c_parser_external_declaration > /home/vries/gcc_versions/devel/src/gcc/c/c-parser.c:1399 > 0x5e72c7 c_parser_translation_unit > /home/vries/gcc_versions/devel/src/gcc/c/c-parser.c:1286 > 0x606c6d c_parse_file() > /home/vries/gcc_versions/devel/src/gcc/c/c-parser.c:14077 > 0x66b7fa c_common_parse_file() > /home/vries/gcc_versions/devel/src/gcc/c-family/c-opts.c:1067 > Please submit a full bug report, > with preprocessed source if appropriate. > Please include the complete backtrace with any bug report. > See <http://gcc.gnu.org/bugs.html> for instructions. > ... > > It looks like BLOCK_SYMBOL_CHECK hasn't been updated. > > Patch below fixes it for me. OK for trunk if bootstrap on x86_64 succeeds? Yes. Ok. jeff
On 05/29/14 06:07, Richard Sandiford wrote: > > Can't really approve it, but it looks obviously correct to me. > Thanks for the fix. Is that something you'd like to see changed? Jeff
2014-05-29 Tom de Vries <tom@codesourcery.com> * rtl.h (BLOCK_SYMBOL_CHECK): Use SYMBOL_REF_FLAGS. --- gcc/rtl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rtl.h b/gcc/rtl.h index 02ce424..51cfae5 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -708,7 +708,7 @@ struct GTY(()) rtvec_def { #define BLOCK_SYMBOL_CHECK(RTX) __extension__ \ ({ __typeof (RTX) const _symbol = (RTX); \ - const unsigned int flags = RTL_CHECKC1 (_symbol, 1, SYMBOL_REF).rt_int; \ + const unsigned int flags = SYMBOL_REF_FLAGS (_symbol); \ if ((flags & SYMBOL_FLAG_HAS_BLOCK_INFO) == 0) \ rtl_check_failed_block_symbol (__FILE__, __LINE__, \ __FUNCTION__); \ -- 1.9.1