http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52906

             Bug #: 52906
           Summary: [4.7/4.8 Regression] ICE: SIGSEGV in check_tag_decl
                    (decl.c:4230) with "__attribute__ ((__deprecated__));"
                    alone
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zso...@seznam.cz


===== testcase.C =====
__attribute__ ((__deprecated__));
======================

Compiler output:
$ gcc testcase.C
testcase.C:1:32: error: declaration does not declare anything [-fpermissive]
==17107== Invalid read of size 2
==17107==    at 0x5B73C5: check_tag_decl(cp_decl_specifier_seq*) (decl.c:4230)
==17107==    by 0x5D7C3D: shadow_tag(cp_decl_specifier_seq*) (decl.c:4263)
==17107==    by 0x69DE3C: cp_parser_simple_declaration(cp_parser*, bool,
tree_node**) (parser.c:10493)
==17107==    by 0x6A40B7: cp_parser_block_declaration(cp_parser*, bool)
(parser.c:10304)
==17107==    by 0x6A932B: cp_parser_declaration(cp_parser*) (parser.c:10200)
==17107==    by 0x6A7F37: cp_parser_declaration_seq_opt(cp_parser*)
(parser.c:10086)
==17107==    by 0x6A98A2: c_parse_file() (parser.c:3797)
==17107==    by 0x7A8664: c_common_parse_file() (c-opts.c:1124)
==17107==    by 0xB8AB0F: toplev_main(int, char**) (toplev.c:556)
==17107==    by 0x66E009C: (below main) (in /lib64/libc-2.13.so)
==17107==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==17107== 
testcase.C:1:32: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The code is accepted with "-fpermissive" (but still ICEs), so I am not sure if
this should be marked as ICE on valid or invalid.

Tested revisions:
r186200 - crash
4.7 r185191 - crash
4.6 r185191 - OK

Reply via email to