diff options
author | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2004-01-08 11:57:53 +0000 |
---|---|---|
committer | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2004-01-08 11:57:53 +0000 |
commit | 663cea5dc02ebf8a4b6d34c574e55544d747519d (patch) | |
tree | 683c15ac202532885d4df0fba9ea03e566192321 | |
parent | 3d5ddced5629ab28ff3dfbceb1293678c9420afb (diff) | |
download | gcc-663cea5dc02ebf8a4b6d34c574e55544d747519d.zip gcc-663cea5dc02ebf8a4b6d34c574e55544d747519d.tar.gz gcc-663cea5dc02ebf8a4b6d34c574e55544d747519d.tar.bz2 |
re PR c++/12573 (ICE (segfault) with Boost.Python)
PR c++/12573
* g++.dg/template/dependent-expr4.C: New test.
From-SVN: r75547
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/dependent-expr4.C | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 778a82e..bedd6da 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + PR c++/12573 + * g++.dg/template/dependent-expr4.C: New test. + 2004-01-08 Hartmut Penner <hpenner@de.ibm.com> * gcc.dg/altivec-11.c: New test. diff --git a/gcc/testsuite/g++.dg/template/dependent-expr4.C b/gcc/testsuite/g++.dg/template/dependent-expr4.C new file mode 100644 index 0000000..066436b --- /dev/null +++ b/gcc/testsuite/g++.dg/template/dependent-expr4.C @@ -0,0 +1,14 @@ +// { dg-do compile }
+// Origin: jbrandmeyer at users dot sourceforge dot net
+// PR c++/12573: COMPONENT_REFs must be inspected for dependness.
+
+template <bool> struct S;
+
+template <typename K> struct Y {
+ int x;
+};
+
+template <class T> struct Z {
+ S< (bool)(__offsetof__(&static_cast<Y<T>*>(0)->x) == 0) >
+ s;
+};
|