From: Dariush Eslimi Date: Sat, 10 Oct 1998 08:11:06 +0000 (+0000) Subject: typeof1.C: New test; typeof based on template-dependent type X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=71685c48ea7df3f46314ad1406bb1157dc8d4b7a;p=gcc.git typeof1.C: New test; typeof based on template-dependent type * g++.old-deja/g++.ext/typeof1.C: New test; typeof based on template-dependent type From-SVN: r22972 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a625a218728..b6a7f6d9f74 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +1998-10-10 Dariush Eslimi + + * g++.old-deja/g++.ext/typeof1.C: New test; typeof based on + template-dependent type + 1998-10-10 Alexandre Oliva * g++.old-deja/g++.brendan/parse3.C: XFAILs, not ERRORs diff --git a/gcc/testsuite/g++.old-deja/g++.ext/typeof1.C b/gcc/testsuite/g++.old-deja/g++.ext/typeof1.C new file mode 100644 index 00000000000..a21f3c7bf3b --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ext/typeof1.C @@ -0,0 +1,19 @@ +// Build don't link: + +// crash test - XFAIL *-*-* + +struct inttest { + int elem[1]; +}; + +template +void F(T x) +{ + typedef typeof(x.elem[0]) dummy; + i = 1; +} + +int main() { + inttest x; + F(x); +}