* g++.old-deja/g++.other/sizeof5.C: New test.
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Feb 2000 09:48:41 +0000 (09:48 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Feb 2000 09:48:41 +0000 (09:48 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32133 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/sizeof5.C [new file with mode: 0644]

index a2da8ba..c162eef 100644 (file)
@@ -1,3 +1,7 @@
+2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * g++.old-deja/g++.other/sizeof5.C: New test.
+
 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
 
        * g++.old-deja/g++.pt/memtemp79.C: Fixed. Remove XFAIL.
diff --git a/gcc/testsuite/g++.old-deja/g++.other/sizeof5.C b/gcc/testsuite/g++.old-deja/g++.other/sizeof5.C
new file mode 100644 (file)
index 0000000..8b56053
--- /dev/null
@@ -0,0 +1,17 @@
+// Build don't link:
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 23 Feb 2000 <nathan@codesourcery.com>
+// Derived from a bug report by Marko Maekelae <Marko.Makela@HUT.FI>
+
+// crash test
+
+struct A;
+void foo ()
+{
+  sizeof ( void ());        // ERROR - ISO forbids
+  sizeof ( void (A::*) ());
+  sizeof ( void (A::*) () const);
+  
+  sizeof (void (*) () const); // ERROR - invalid quals
+  sizeof ( void () const);  // ERROR - ISO forbids, ERROR - invalid quals
+}