From b4a5df67f1382a33f4535eb1b10600ca52d294d3 Mon Sep 17 00:00:00 2001 From: Lorry Date: Mon, 9 Jan 2012 13:47:42 +0000 Subject: Tarball conversion --- gcc/testsuite/g++.dg/cpp0x/range-for8.C | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/range-for8.C (limited to 'gcc/testsuite/g++.dg/cpp0x/range-for8.C') diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for8.C b/gcc/testsuite/g++.dg/cpp0x/range-for8.C new file mode 100644 index 0000000000..641dfe052c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/range-for8.C @@ -0,0 +1,16 @@ +// Test for range-based for loop when the declarator declares +// a new type + +// { dg-do compile } +// { dg-options "-std=c++0x" } + +#include + +void test() +{ + for (struct S { } *x : { (S*)0, (S*)0 } ) + ; + + for (struct S { } x : { S(), S() } ) + ; +} -- cgit v1.2.1