Commit b75cebc4 by Marek Polacek Committed by Marek Polacek

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
parent df6d9c7f
2015-03-20 Marek Polacek <polacek@redhat.com>
PR c++/65072
* typeck.c (lookup_anon_field): Make sure we're dealing with the main
variant.
2015-03-19 Jason Merrill <jason@redhat.com>
PR c++/65046
......
......@@ -2213,6 +2213,8 @@ lookup_anon_field (tree t, tree type)
{
tree field;
t = TYPE_MAIN_VARIANT (t);
for (field = TYPE_FIELDS (t); field; field = DECL_CHAIN (field))
{
if (TREE_STATIC (field))
......
2015-03-20 Marek Polacek <polacek@redhat.com>
PR c++/65072
* g++.dg/cpp0x/pr65072.C: New test.
2015-03-20 Richard Biener <rguenther@suse.de>
PR middle-end/64715
......
// PR c++/65075
// { dg-do compile { target c++11 } }
// { dg-options "-Wno-pedantic" }
template <typename> class C
{
struct
{
int i;
};
auto operator*(const C m) -> decltype (m.i);
};
void fn1 (const C<float>);
C<float> a;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment