diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2012-05-25 19:29:33 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2012-05-25 19:29:33 +0200 |
commit | b7d56bdfe99532da6a60aa6e958a5022e3848ecd (patch) | |
tree | e7a8e3cf3257fe8ee6d1312e4de7435353808669 /gcc | |
parent | 7be9eece4c9198e8ded9d6a0cd4a9f8eea92dd70 (diff) | |
download | gcc-b7d56bdfe99532da6a60aa6e958a5022e3848ecd.zip gcc-b7d56bdfe99532da6a60aa6e958a5022e3848ecd.tar.gz gcc-b7d56bdfe99532da6a60aa6e958a5022e3848ecd.tar.bz2 |
re PR objc++/53441 (obj-c++.dg/ivar-invalid-type-1.mm ICE)
PR obj-c++/53441
* decl.c (grokdeclarator): Check that current_class_type is non-NULL
before calling constructor_name_p.
From-SVN: r187888
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4da78b8..daf1a6c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2012-05-24 Uros Bizjak <ubizjak@gmail.com> + + PR obj-c++/53441 + * decl.c (grokdeclarator): Check that current_class_type is non-NULL + before calling constructor_name_p. + 2012-05-24 Paolo Carlini <paolo.carlini@oracle.com> PR c++/32080 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index d883da6..14a6a40 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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); |