public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc++/53441] New: [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE
@ 2012-05-21 20:59 ubizjak at gmail dot com
2012-05-21 20:59 ` [Bug objc++/53441] " ubizjak at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2012-05-21 20:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53441
Bug #: 53441
Summary: [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: ice-checking, ice-on-invalid-code
Severity: normal
Priority: P3
Component: objc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ubizjak@gmail.com
Target: x86_64-pc-linux-gnu
Created attachment 27464
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27464
Preprocessed source of the failing test
gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm currently ICEs on
x86_64-pc-linux-gnu (and probably other targets) with:
$ ~/gcc-build/gcc/cc1objplus ivar-invalid-type-1.mii
/home/uros/gcc-svn/trunk/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm:16:15:
internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
(gdb) bt
#0 constructor_name_p (name=0x7ffff1b33108, type=0x0) at
../../gcc-svn/trunk/gcc/cp/name-lookup.c:1961
#1 0x00000000005897cb in grokdeclarator (declarator=0x17c8740,
declspecs=<optimized out>, decl_context=<optimized out>, initialized=0,
attrlist=0x7fffffffdaa8) at ../../gcc-svn/trunk/gcc/cp/decl.c:9806
#2 0x00000000006157ca in grokfield (declarator=<optimized out>,
declspecs=0x7fffffffdb10, init=0x0, init_const_expr_p=<optimized out>,
asmspec_tree=0x0, attrlist=0x101010101010101) at
../../gcc-svn/trunk/gcc/cp/decl2.c:810
#3 0x0000000000652dc4 in cp_parser_objc_class_ivars (parser=0x7ffff1b331b8) at
../../gcc-svn/trunk/gcc/cp/parser.c:24093
#4 cp_parser_objc_class_ivars (parser=0x7ffff1b331b8) at
../../gcc-svn/trunk/gcc/cp/parser.c:23986
#5 0x000000000065c568 in cp_parser_objc_class_interface (attributes=0x0,
parser=0x7ffff1b331b8) at ../../gcc-svn/trunk/gcc/cp/parser.c:24248
#6 cp_parser_objc_declaration (parser=0x7ffff1b331b8, attributes=0x0) at
../../gcc-svn/trunk/gcc/cp/parser.c:24341
(gdb) li
1956 bool
1957 constructor_name_p (tree name, tree type)
1958 {
1959 tree ctor_name;
1960
1961 gcc_assert (MAYBE_CLASS_TYPE_P (type));
1962
1963 if (!name)
1964 return false;
1965
(gdb) p type
$1 = (tree_node *) 0x0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug objc++/53441] [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE
2012-05-21 20:59 [Bug objc++/53441] New: [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE ubizjak at gmail dot com
@ 2012-05-21 20:59 ` ubizjak at gmail dot com
2012-05-22 10:12 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2012-05-21 20:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53441
--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2012-05-21 20:43:40 UTC ---
Following patch fixes the ICE:
--cut here--
Index: cp/decl.c
===================================================================
--- cp/decl.c (revision 187736)
+++ cp/decl.c (working copy)
@@ -9803,7 +9803,8 @@ grokdeclarator (const cp_declarator *declarator,
clones. */
DECL_ABSTRACT (decl) = 1;
}
- else if (constructor_name_p (unqualified_id, current_class_type))
+ else if (current_class_type
+ && constructor_name_p (unqualified_id, current_class_type))
permerror (input_location, "ISO C++ forbids nested type %qD with same
name "
"as enclosing class",
unqualified_id);
--cut here--
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug objc++/53441] [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE
2012-05-21 20:59 [Bug objc++/53441] New: [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE ubizjak at gmail dot com
2012-05-21 20:59 ` [Bug objc++/53441] " ubizjak at gmail dot com
@ 2012-05-22 10:12 ` rguenth at gcc dot gnu.org
2012-05-25 17:34 ` uros at gcc dot gnu.org
2012-05-25 17:53 ` ubizjak at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-22 10:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53441
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-05-22
Target Milestone|--- |4.8.0
Ever Confirmed|0 |1
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-22 09:51:52 UTC ---
Confirmed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug objc++/53441] [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE
2012-05-21 20:59 [Bug objc++/53441] New: [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE ubizjak at gmail dot com
2012-05-21 20:59 ` [Bug objc++/53441] " ubizjak at gmail dot com
2012-05-22 10:12 ` rguenth at gcc dot gnu.org
@ 2012-05-25 17:34 ` uros at gcc dot gnu.org
2012-05-25 17:53 ` ubizjak at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: uros at gcc dot gnu.org @ 2012-05-25 17:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53441
--- Comment #3 from uros at gcc dot gnu.org 2012-05-25 17:29:38 UTC ---
Author: uros
Date: Fri May 25 17:29:33 2012
New Revision: 187888
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187888
Log:
PR obj-c++/53441
* decl.c (grokdeclarator): Check that current_class_type is non-NULL
before calling constructor_name_p.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug objc++/53441] [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE
2012-05-21 20:59 [Bug objc++/53441] New: [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE ubizjak at gmail dot com
` (2 preceding siblings ...)
2012-05-25 17:34 ` uros at gcc dot gnu.org
@ 2012-05-25 17:53 ` ubizjak at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2012-05-25 17:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53441
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2012-05/msg01449.htm
| |l
Resolution| |FIXED
--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2012-05-25 17:34:42 UTC ---
Fixed
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-25 17:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-21 20:59 [Bug objc++/53441] New: [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE ubizjak at gmail dot com
2012-05-21 20:59 ` [Bug objc++/53441] " ubizjak at gmail dot com
2012-05-22 10:12 ` rguenth at gcc dot gnu.org
2012-05-25 17:34 ` uros at gcc dot gnu.org
2012-05-25 17:53 ` ubizjak at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).