diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/local2.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/local2.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/local2.C b/gcc/testsuite/g++.old-deja/g++.pt/local2.C new file mode 100644 index 000000000..9dee5e56e --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/local2.C @@ -0,0 +1,21 @@ +// { dg-do run } +extern "C" void abort(); + +template <class T> +void f(T) +{ + struct S { + int i; + } s; + + s.i = 3; + + if (s.i != 3) + abort(); +} + + +int main() +{ + f(7); +} |