[Bug c/71426] New: gcc ICE on x86_64-linux-gnu in get_parm_info, at c/c-decl.c:7059

helloqirun at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Jun 5 19:24:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71426

            Bug ID: 71426
           Summary: gcc ICE on x86_64-linux-gnu in get_parm_info, at
                    c/c-decl.c:7059
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: helloqirun at gmail dot com
  Target Milestone: ---

The following invalid code causes an ICE when compiled with the current gcc
trunk on x86_64-linux-gnu in both 32-bit and 64-bit modes. 

It affects the current trunk, 4.X. But works for 5.X and 6.X.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 7.0.0 20160605 (experimental) [trunk revision 237097] (GCC)


$ gcc-trunk a.c
a.c:1:33: error: ‘ID1’ undeclared here (not in a function)
 signed * * ID0 ( inline ID1 [ + ID1 %  3.14 - ID1 ( ) ] ) ;
                                 ^~~
a.c:1:47: warning: implicit declaration of function ‘ID1’
[-Wimplicit-function-declaration]
 signed * * ID0 ( inline ID1 [ + ID1 %  3.14 - ID1 ( ) ] ) ;
                                               ^~~
a.c:1:25: warning: type defaults to ‘int’ in declaration of ‘ID1’
[-Wimplicit-int]
 signed * * ID0 ( inline ID1 [ + ID1 %  3.14 - ID1 ( ) ] ) ;
                         ^~~
a.c:1:25: warning: parameter ‘ID1’ declared ‘inline’
a.c:1:1: internal compiler error: in get_parm_info, at c/c-decl.c:7059
 signed * * ID0 ( inline ID1 [ + ID1 %  3.14 - ID1 ( ) ] ) ;
 ^~~~~~
0x65d2dd get_parm_info(bool, tree_node*)
        ../../gcc/gcc/c/c-decl.c:7059
0x6c2160 c_parser_parms_list_declarator
        ../../gcc/gcc/c/c-parser.c:3756
0x6c22a0 c_parser_parms_declarator
        ../../gcc/gcc/c/c-parser.c:3672
0x6c4df9 c_parser_direct_declarator_inner
        ../../gcc/gcc/c/c-parser.c:3601
0x6c25d1 c_parser_declarator
        ../../gcc/gcc/c/c-parser.c:3362
0x6c25d1 c_parser_declarator
        ../../gcc/gcc/c/c-parser.c:3362
0x6c801a c_parser_declaration_or_fndef
        ../../gcc/gcc/c/c-parser.c:1816
0x6d461d c_parser_external_declaration
        ../../gcc/gcc/c/c-parser.c:1549
0x6d5049 c_parser_translation_unit
        ../../gcc/gcc/c/c-parser.c:1430
0x6d5049 c_parse_file()
        ../../gcc/gcc/c/c-parser.c:17930
0x737922 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1064
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.



$ cat a.c
signed * * ID0 ( inline ID1 [ + ID1 %  3.14 - ID1 ( ) ] ) ;


More information about the Gcc-bugs mailing list