aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-12-22 03:34:55 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2004-12-22 03:34:55 +0000
commit943e3eded2ab29d35a266cb0d7bfcbda9d96e038 (patch)
tree3c4219827d7473d470169c52b58780a7e3078422 /gcc/testsuite
parentbe99edf8839b914004bc3f96f5acdc515198db86 (diff)
downloadgcc-943e3eded2ab29d35a266cb0d7bfcbda9d96e038.zip
gcc-943e3eded2ab29d35a266cb0d7bfcbda9d96e038.tar.gz
gcc-943e3eded2ab29d35a266cb0d7bfcbda9d96e038.tar.bz2
re PR c++/18378 (ICE when returning a copy of a packed member)
PR c++/18378 * call.c (convert_like_real): Do not permit the use of a copy constructor to copy a packed field. PR c++/17413 * decl.c (grokdeclarator): Return error_mark_node, not void_type_node, to indicate errors. * parser.c (cp_parser_template_parameter_list): Robustify. (cp_parser_template_parameter): Likewise. PR c++/19034 * tree.c (cp_tree_equal): Handle OVERLOAD. PR c++/18378 * g++.dg/ext/packed8.C: New test. PR c++/13268 * g++.dg/template/crash31.C: New test. PR c++/19034 * g++.dg/template/crash30.C: New test. From-SVN: r92486
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog11
-rw-r--r--gcc/testsuite/g++.dg/ext/packed8.C20
-rw-r--r--gcc/testsuite/g++.dg/template/crash30.C16
-rw-r--r--gcc/testsuite/g++.dg/template/crash31.C3
4 files changed, 50 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7d62fc4..74f7374 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2004-12-21 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/18378
+ * g++.dg/ext/packed8.C: New test.
+
+ PR c++/13268
+ * g++.dg/template/crash31.C: New test.
+
+ PR c++/19034
+ * g++.dg/template/crash30.C: New test.
+
2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
PR C++/18984
diff --git a/gcc/testsuite/g++.dg/ext/packed8.C b/gcc/testsuite/g++.dg/ext/packed8.C
new file mode 100644
index 0000000..a68fa2c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/packed8.C
@@ -0,0 +1,20 @@
+// PR c++/18378
+
+class A
+{
+public:
+ int i;
+
+ A() {}
+ A(const A& a) { i = a.i; }
+};
+
+class B
+{
+ A a __attribute__((packed));
+
+public:
+ B() {}
+ A GetA() { return a; } // { dg-error "" }
+};
+
diff --git a/gcc/testsuite/g++.dg/template/crash30.C b/gcc/testsuite/g++.dg/template/crash30.C
new file mode 100644
index 0000000..145b076
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash30.C
@@ -0,0 +1,16 @@
+// PR c++/19034
+
+template< bool C > struct B
+{
+};
+
+template<typename S> int foo();
+template<typename S> int foo1();
+
+template<typename T> struct bar : public B <(sizeof(foo<T>()) == 1)>
+{
+};
+
+template<typename T> struct bar1 : public B <(sizeof(foo1<T>()) == 1)>
+{
+};
diff --git a/gcc/testsuite/g++.dg/template/crash31.C b/gcc/testsuite/g++.dg/template/crash31.C
new file mode 100644
index 0000000..7d66b1b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash31.C
@@ -0,0 +1,3 @@
+// PR c++/13268
+
+template<operator< struct A {}; // { dg-error "" }