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

            Bug ID: 70264
           Summary: ICE at -O0 to -O3 in both 32-bit and 64-bit modes on
                    x86_64-linux-gnu (compatible_locations_p, at
                    diagnostic-show-locus.c:490)
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chengniansun at gmail dot com
  Target Milestone: ---

$: gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 6.0.0 20160316 (experimental) [trunk revision 234270] (GCC) 
$: 
$: gcc-trunk small.c
small.c:1:11: error: expected identifier or ‘(’ before numeric constant

small.c:1:11: internal compiler error: in compatible_locations_p, at
diagnostic-show-locus.c:490
small.c:2:1: note: in expansion of macro ‘X’
 X
 ^
0x1317e8d compatible_locations_p
        ../../gcc-source-trunk/gcc/diagnostic-show-locus.c:490
0x131884a layout
        ../../gcc-source-trunk/gcc/diagnostic-show-locus.c:609
0x1318cdf diagnostic_show_locus(diagnostic_context*, diagnostic_info const*)
        ../../gcc-source-trunk/gcc/diagnostic-show-locus.c:1102
0x6b6960 c_diagnostic_finalizer
        ../../gcc-source-trunk/gcc/c-family/c-opts.c:167
0x1316019 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        ../../gcc-source-trunk/gcc/diagnostic.c:828
0x1316e95 error(char const*, ...)
        ../../gcc-source-trunk/gcc/diagnostic.c:1154
0x699f7c c_parse_error(char const*, cpp_ttype, tree_node*, unsigned char)
        ../../gcc-source-trunk/gcc/c-family/c-common.c:10138
0x6421ec c_parser_direct_declarator
        ../../gcc-source-trunk/gcc/c/c-parser.c:3485
0x6421ec c_parser_declarator
        ../../gcc-source-trunk/gcc/c/c-parser.c:3369
0x64a6fb c_parser_declaration_or_fndef
        ../../gcc-source-trunk/gcc/c/c-parser.c:1815
0x654cae c_parser_external_declaration
        ../../gcc-source-trunk/gcc/c/c-parser.c:1548
0x6557b9 c_parser_translation_unit
        ../../gcc-source-trunk/gcc/c/c-parser.c:1429
0x6557b9 c_parse_file()
        ../../gcc-source-trunk/gcc/c/c-parser.c:17840
0x6b9512 c_common_parse_file()
        ../../gcc-source-trunk/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 small.c
#define X __LINE__
X
$:

Reply via email to