Summary: | [3.4/4.0 Regression] ICE on syntax error, template header. | ||
---|---|---|---|
Product: | gcc | Reporter: | duz |
Component: | c++ | Assignee: | Mark Mitchell <mark> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, giles, switch |
Priority: | P2 | Keywords: | ice-on-invalid-code |
Version: | 3.4.0 | ||
Target Milestone: | 3.4.1 | ||
Host: | Target: | ||
Build: | Known to work: | 3.3.3 | |
Known to fail: | 3.4.0 4.0.0 | Last reconfirmed: | 2004-04-21 14:02:15 |
Description
duz
2004-04-21 13:54:28 UTC
Confirmed. Here is the backtrace for the mainline: 1891 if (TYPE_P (type)) (gdb) bt #0 cp_parser_check_for_invalid_template_id (parser=0x40129880, type=0x0) at /home/gates/ pinskia/src/gnu/gcc/src/gcc/cp/parser.c:1891 #1 0x080ea524 in cp_parser_type_specifier (parser=0x40129880, flags=Variable "flags" is not available. ) at /home/gates/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:12099 #2 0x080eb4ce in cp_parser_decl_specifier_seq (parser=0x40129880, flags=CP_PARSER_FLAGS_OPTIONAL, attributes=0xbffebbb4, declares_class_or_enum=0xbffebbb8) at /home/gates/pinskia/src/gnu/gcc/src/gcc/cp/parser.c: 6796 #3 0x080f2b5c in cp_parser_explicit_instantiation (parser=0x40129880) at /home/gates/pinskia/src/ gnu/gcc/src/gcc/cp/parser.c:8586 #4 0x080f2e47 in cp_parser_declaration (parser=0x40129880) at /home/gates/pinskia/src/gnu/gcc/ src/gcc/cp/parser.c:6385 #5 0x080f3020 in cp_parser_declaration_seq_opt (parser=0x40127cc8) at /home/gates/pinskia/src/ gnu/gcc/src/gcc/cp/parser.c:6300 #6 0x080f320e in c_parse_file () at /home/gates/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:2393 #7 0x0818194b in c_common_parse_file (set_yydebug=0) at /home/gates/pinskia/src/gnu/gcc/src/ gcc/c-opts.c:1238 #8 0x083bf491 in toplev_main (argc=1074953416, argv=0x84be8a0) at /home/gates/pinskia/src/ gnu/gcc/src/gcc/toplev.c:1595 #9 0x0818556e in main (argc=1074953416, argv=0x40127cc8) at /home/gates/pinskia/src/gnu/ gcc/src/gcc/main.c:35 Working on a fix. Subject: Bug 15044 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: mmitchel@gcc.gnu.org 2004-05-24 02:22:19 Modified files: gcc/testsuite : ChangeLog gcc/cp : ChangeLog parser.c typeck.c Added files: gcc/testsuite/g++.dg/ext: attrib14.C gcc/testsuite/g++.dg/template: error12.C ptrmem9.C Log message: PR c++/15044 * parser.c (cp_parser_class_head): Robustify. PR c++/15317 * parser.c (cp_parser_decl_specifier_seq): Correct error in comment. (cp_parser_constructor_declarator_p): Treat attributes as decl-specifiers. PR c++/15329 * typeck.c (build_unary_op): Do not attempt to resolve casts to base classes in templates. PR c++/15044 * g++.dg/template/error12.C: New test. PR c++/15317 * g++.dg/ext/attrib14.C: New test. PR c++/15329 * g++.dg/template/ptrmem9.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.182&r2=1.3389.2.183 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.105&r2=1.3892.2.106 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.27&r2=1.157.2.28 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.519.2.15&r2=1.519.2.16 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attrib14.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.2.16.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/error12.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ptrmem9.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1 Subject: Bug 15044 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2004-05-24 02:29:35 Modified files: gcc/testsuite : ChangeLog gcc/cp : ChangeLog parser.c typeck.c Added files: gcc/testsuite/g++.dg/ext: attrib15.C gcc/testsuite/g++.dg/template: error12.C ptrmem9.C Log message: PR c++/15044 * parser.c (cp_parser_class_head): Robustify. PR c++/15317 * parser.c (cp_parser_decl_specifier_seq): Correct error in comment. (cp_parser_constructor_declarator_p): Treat attributes as decl-specifiers. PR c++/15329 * typeck.c (build_unary_op): Do not attempt to resolve casts to base classes in templates. PR c++/15044 * g++.dg/template/error12.C: New test. PR c++/15317 * g++.dg/ext/attrib15.C: New test. PR c++/15329 * g++.dg/template/ptrmem9.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3777&r2=1.3778 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4056&r2=1.4057 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.194&r2=1.195 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.543&r2=1.544 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attrib15.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/error12.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ptrmem9.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 Subject: Bug 15044 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: mmitchel@gcc.gnu.org 2004-05-24 02:30:28 Modified files: gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/ext: attrib15.C Log message: PR c++/15044 * parser.c (cp_parser_class_head): Robustify. PR c++/15317 * parser.c (cp_parser_decl_specifier_seq): Correct error in comment. (cp_parser_constructor_declarator_p): Treat attributes as decl-specifiers. PR c++/15329 * typeck.c (build_unary_op): Do not attempt to resolve casts to base classes in templates. PR c++/15044 * g++.dg/template/error12.C: New test. PR c++/15317 * g++.dg/ext/attrib15.C: New test. PR c++/15329 * g++.dg/template/ptrmem9.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.183&r2=1.3389.2.184 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attrib15.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1 Fixed in GCC 3.4.1. *** Bug 16133 has been marked as a duplicate of this bug. *** |