summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authoroliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4>1998-10-10 08:11:06 +0000
committeroliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4>1998-10-10 08:11:06 +0000
commit0d954e77ca3f53e3c2553c6c2ed8efab22747053 (patch)
tree82adaf4f3b0f2a8c8dd2a713e0193ca0ceb9f589 /gcc
parenta1bdc04d791ce7630209c2d110589d3f767d4831 (diff)
downloadppe42-gcc-0d954e77ca3f53e3c2553c6c2ed8efab22747053.tar.gz
ppe42-gcc-0d954e77ca3f53e3c2553c6c2ed8efab22747053.zip
* g++.old-deja/g++.ext/typeof1.C: New test; typeof based on
template-dependent type git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22972 138bc75d-0d04-0410-961f-82ee72b054a4
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 a625a218728..b6a7f6d9f74 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 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 <class T>
+void F(T x)
+{
+ typedef typeof(x.elem[0]) dummy;
+ i = 1;
+}
+
+int main() {
+ inttest x;
+ F(x);
+}
OpenPOWER on IntegriCloud