aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDariush Eslimi <eslimi@loran.com>1998-10-10 08:11:06 +0000
committerAlexandre Oliva <oliva@gcc.gnu.org>1998-10-10 08:11:06 +0000
commit71685c48ea7df3f46314ad1406bb1157dc8d4b7a (patch)
tree82adaf4f3b0f2a8c8dd2a713e0193ca0ceb9f589 /gcc
parente98791f8a6d75fcb9d08a5398b4e1a56044c811a (diff)
downloadgcc-71685c48ea7df3f46314ad1406bb1157dc8d4b7a.zip
gcc-71685c48ea7df3f46314ad1406bb1157dc8d4b7a.tar.gz
gcc-71685c48ea7df3f46314ad1406bb1157dc8d4b7a.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ext/typeof1.C19
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a625a21..b6a7f6d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+1998-10-10 Dariush Eslimi <eslimi@loran.com>
+
+ * g++.old-deja/g++.ext/typeof1.C: New test; typeof based on
+ template-dependent type
+
1998-10-10 Alexandre Oliva <oliva@dcc.unicamp.br>
* 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 0000000..a21f3c7
--- /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 <class T>
+void F(T x)
+{
+ typedef typeof(x.elem[0]) dummy;
+ i = 1;
+}
+
+int main() {
+ inttest x;
+ F(x);
+}