This is the mail archive of the gcc-bugs@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]

[Bug c/68320] New: internal compiler error: in declspecs_add_type


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

            Bug ID: 68320
           Summary: internal compiler error: in declspecs_add_type
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

As promised in PR67784:

void
h ()
{
  for (typedef int T;;)
    if (1)
      ;
  T *x;
  x = 0;
}

$ ./cc1 -quiet tt.c 
tt.c: In function âhâ:
tt.c:4:3: error: declaration of non-variable âTâ in âforâ loop initial
declaration
   for (typedef int T;;)
   ^

tt.c:7:3: internal compiler error: Segmentation fault
   T *x;
   ^

0xce9826 crash_signal
        /home/marek/src/gcc/gcc/toplev.c:336
0x6aca7c declspecs_add_type(unsigned int, c_declspecs*, c_typespec)
        /home/marek/src/gcc/gcc/c/c-decl.c:9539
0x701ae0 c_parser_declspecs
        /home/marek/src/gcc/gcc/c/c-parser.c:2315
0x6ffe99 c_parser_declaration_or_fndef
        /home/marek/src/gcc/gcc/c/c-parser.c:1560
0x706670 c_parser_compound_statement_nostart
        /home/marek/src/gcc/gcc/c/c-parser.c:4655
0x7062cf c_parser_compound_statement
        /home/marek/src/gcc/gcc/c/c-parser.c:4566
0x701139 c_parser_declaration_or_fndef
        /home/marek/src/gcc/gcc/c/c-parser.c:1987
0x6ffc23 c_parser_external_declaration
        /home/marek/src/gcc/gcc/c/c-parser.c:1431
0x6ff82b c_parser_translation_unit
        /home/marek/src/gcc/gcc/c/c-parser.c:1318
0x72f99d c_parse_file()
        /home/marek/src/gcc/gcc/c/c-parser.c:17360
0x799abb c_common_parse_file()
        /home/marek/src/gcc/gcc/c-family/c-opts.c:1062
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.

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