re PR c++/65072 (Segfault when parsing dectlype in trailing return type)
authorMarek Polacek <polacek@redhat.com>
Fri, 20 Mar 2015 14:56:53 +0000 (14:56 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 20 Mar 2015 14:56:53 +0000 (14:56 +0000)
commitb75cebc4a74ccc72541875d847bc11889568f127
tree7067e3d329a41be6d9fd852796c6029cb183c8f4
parentdf6d9c7f6af7a59d57caa09bd04265901065bc64
re PR c++/65072 (Segfault when parsing dectlype in trailing return type)

PR c++/65072
* typeck.c (lookup_anon_field): Make sure we're dealing with the main
variant.

* g++.dg/cpp0x/pr65072.C: New test.

From-SVN: r221535
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr65072.C [new file with mode: 0644]