diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/typeof5.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/typeof5.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/typeof5.C b/gcc/testsuite/g++.dg/ext/typeof5.C new file mode 100644 index 00000000000..ef75f255cb4 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/typeof5.C @@ -0,0 +1,17 @@ +// { dg-options "" } + +template <class T> +void test1() { + int x = 0; + const typeof(x) & t1 = x+0; +} + +void test2() { + int x = 0; + const typeof(x) & t1 = x+0; +} + +int main() { + test1<int>(); + test2 (); +} |