public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50491] New: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function
@ 2011-09-22 23:29 jyasskin at gcc dot gnu.org
2011-09-22 23:40 ` [Bug c++/50491] " jyasskin at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jyasskin at gcc dot gnu.org @ 2011-09-22 23:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50491
Bug #: 50491
Summary: [C++0x] "unexpected ast of kind using_decl" on call to
using'ed grandparent member function
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jyasskin@gcc.gnu.org
CC: aaw@google.com
$ cat test.ii
struct GrandParent {
void *get();
};
template<class OBJ>
struct Parent : public GrandParent{
};
template<typename T>
struct Child : public Parent<T> {
using GrandParent::get;
void Foo() {
void* ex = get();
}
};
$ clang++ -std=gnu++0x -fsyntax-only test.ii
$ g++-4.6 --version
g++-4.6 (GCC) 4.6.1
$ g++-4.6 -std=gnu++0x -fsyntax-only test.ii
test.ii: In member function 'void Child<T>::Foo()':
test.ii:13:20: sorry, unimplemented: unexpected ast of kind using_decl
test.ii:13: confused by earlier errors, bailing out
$ g++-4.7svn --version
g++-4.7svn (GCC) 4.7.0 20110911 (experimental)
$ g++-4.7svn -std=gnu++0x -fsyntax-only test.ii
test.ii: In member function ‘void Child<T>::Foo()’:
test.ii:13:20: sorry, unimplemented: unexpected ast of kind using_decl
test.ii:13:20: internal compiler error: in potential_constant_expression_1, at
cp/semantics.c:8226
If I change the "get()" line to "(void)get();", g++-4.6.1 succeeds, but g++-4.7
still fails with the same error. Making GrandParent non-dependent by passing a
concrete type to Parent<> makes both versions succeed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50491] [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function
2011-09-22 23:29 [Bug c++/50491] New: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function jyasskin at gcc dot gnu.org
@ 2011-09-22 23:40 ` jyasskin at gcc dot gnu.org
2011-09-22 23:52 ` [Bug c++/50491] [C++0x] [4.6/4.7 Regression] " paolo.carlini at oracle dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jyasskin at gcc dot gnu.org @ 2011-09-22 23:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50491
--- Comment #1 from Jeffrey Yasskin <jyasskin at gcc dot gnu.org> 2011-09-22 23:14:35 UTC ---
Both g++ versions also succeed when passed -std=c++98.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50491] [C++0x] [4.6/4.7 Regression] "unexpected ast of kind using_decl" on call to using'ed grandparent member function
2011-09-22 23:29 [Bug c++/50491] New: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function jyasskin at gcc dot gnu.org
2011-09-22 23:40 ` [Bug c++/50491] " jyasskin at gcc dot gnu.org
@ 2011-09-22 23:52 ` paolo.carlini at oracle dot com
2011-09-23 0:01 ` paolo.carlini at oracle dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-22 23:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50491
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-09-22
Summary|[C++0x] "unexpected ast of |[C++0x] [4.6/4.7
|kind using_decl" on call to |Regression] "unexpected ast
|using'ed grandparent member |of kind using_decl" on call
|function |to using'ed grandparent
| |member function
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50491] [C++0x] [4.6/4.7 Regression] "unexpected ast of kind using_decl" on call to using'ed grandparent member function
2011-09-22 23:29 [Bug c++/50491] New: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function jyasskin at gcc dot gnu.org
2011-09-22 23:40 ` [Bug c++/50491] " jyasskin at gcc dot gnu.org
2011-09-22 23:52 ` [Bug c++/50491] [C++0x] [4.6/4.7 Regression] " paolo.carlini at oracle dot com
@ 2011-09-23 0:01 ` paolo.carlini at oracle dot com
2011-09-23 0:55 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-23 0:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50491
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |paolo.carlini at oracle dot
|gnu.org |com
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-22 23:39:46 UTC ---
Yes. Luckily the issue seems easy to fix.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50491] [C++0x] [4.6/4.7 Regression] "unexpected ast of kind using_decl" on call to using'ed grandparent member function
2011-09-22 23:29 [Bug c++/50491] New: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function jyasskin at gcc dot gnu.org
` (2 preceding siblings ...)
2011-09-23 0:01 ` paolo.carlini at oracle dot com
@ 2011-09-23 0:55 ` redi at gcc dot gnu.org
2011-09-23 0:57 ` paolo at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2011-09-23 0:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50491
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-22 23:52:15 UTC ---
This fixes the ICE but I don't know if it's correct and haven't run the
testsuite:
Index: semantics.c
===================================================================
--- semantics.c (revision 178930)
+++ semantics.c (working copy)
@@ -7751,6 +7751,7 @@
/* We can see a FIELD_DECL in a pointer-to-member expression. */
case FIELD_DECL:
case PARM_DECL:
+ case USING_DECL:
return true;
case AGGR_INIT_EXPR:
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50491] [C++0x] [4.6/4.7 Regression] "unexpected ast of kind using_decl" on call to using'ed grandparent member function
2011-09-22 23:29 [Bug c++/50491] New: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function jyasskin at gcc dot gnu.org
` (3 preceding siblings ...)
2011-09-23 0:55 ` redi at gcc dot gnu.org
@ 2011-09-23 0:57 ` paolo at gcc dot gnu.org
2011-09-23 3:48 ` paolo at gcc dot gnu.org
2011-09-23 6:12 ` paolo.carlini at oracle dot com
6 siblings, 0 replies; 8+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-09-23 0:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50491
--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-09-23 00:54:38 UTC ---
Author: paolo
Date: Fri Sep 23 00:54:32 2011
New Revision: 179109
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179109
Log:
/cp
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50491
* semantics.c (potential_constant_expression_1): Handle USING_DECL.
/testsuite
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50491
* g++.dg/cpp0x/pr50491.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/pr50491.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50491] [C++0x] [4.6/4.7 Regression] "unexpected ast of kind using_decl" on call to using'ed grandparent member function
2011-09-22 23:29 [Bug c++/50491] New: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function jyasskin at gcc dot gnu.org
` (4 preceding siblings ...)
2011-09-23 0:57 ` paolo at gcc dot gnu.org
@ 2011-09-23 3:48 ` paolo at gcc dot gnu.org
2011-09-23 6:12 ` paolo.carlini at oracle dot com
6 siblings, 0 replies; 8+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-09-23 3:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50491
--- Comment #5 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-09-23 00:55:20 UTC ---
Author: paolo
Date: Fri Sep 23 00:55:16 2011
New Revision: 179110
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179110
Log:
/cp
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50491
* semantics.c (potential_constant_expression_1): Handle USING_DECL.
/testsuite
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50491
* g++.dg/cpp0x/pr50491.C: New.
Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/pr50491.C
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/semantics.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/50491] [C++0x] [4.6/4.7 Regression] "unexpected ast of kind using_decl" on call to using'ed grandparent member function
2011-09-22 23:29 [Bug c++/50491] New: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function jyasskin at gcc dot gnu.org
` (5 preceding siblings ...)
2011-09-23 3:48 ` paolo at gcc dot gnu.org
@ 2011-09-23 6:12 ` paolo.carlini at oracle dot com
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-23 6:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50491
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.6.2
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-23 00:56:34 UTC ---
Fixed mainline and 4.6.2.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-09-23 0:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22 23:29 [Bug c++/50491] New: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function jyasskin at gcc dot gnu.org
2011-09-22 23:40 ` [Bug c++/50491] " jyasskin at gcc dot gnu.org
2011-09-22 23:52 ` [Bug c++/50491] [C++0x] [4.6/4.7 Regression] " paolo.carlini at oracle dot com
2011-09-23 0:01 ` paolo.carlini at oracle dot com
2011-09-23 0:55 ` redi at gcc dot gnu.org
2011-09-23 0:57 ` paolo at gcc dot gnu.org
2011-09-23 3:48 ` paolo at gcc dot gnu.org
2011-09-23 6:12 ` paolo.carlini at oracle 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).