diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/regress/array1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/regress/array1.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/array1.C b/gcc/testsuite/g++.dg/cpp0x/regress/array1.C new file mode 100644 index 000000000..629ab4103 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/regress/array1.C @@ -0,0 +1,16 @@ +// PR c++/47808 +// { dg-options -std=c++0x } + +template <typename T> +inline T abs (T const & x) { return x; } + +template <typename T> +void f (T) +{ + typedef int ai[(abs(0.1) > 0) ? 1 : -1]; +} + +int main() +{ + f(1); +} |