diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-01-03 01:54:40 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-01-03 01:54:40 +0100 |
commit | 493aa551b29a64091d07e3a0736b5cd3b84e94a4 (patch) | |
tree | 9c32c8623b462e75703ad770a137a1eaeba5e765 /gcc/testsuite/g++.dg | |
parent | 5f26a23027acae2712001616c4b13c76cf316cd5 (diff) | |
download | gcc-493aa551b29a64091d07e3a0736b5cd3b84e94a4.zip gcc-493aa551b29a64091d07e3a0736b5cd3b84e94a4.tar.gz gcc-493aa551b29a64091d07e3a0736b5cd3b84e94a4.tar.bz2 |
re PR c++/38705 (ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t)
PR c++/38705
* builtins.c (fold_builtin_memory_op): Give up if either operand
is volatile. Set srctype or desttype to non-qualified version
of the other type.
* g++.dg/torture/pr38705.C: New test.
From-SVN: r143029
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/torture/pr38705.C | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/torture/pr38705.C b/gcc/testsuite/g++.dg/torture/pr38705.C new file mode 100644 index 0000000..8058d3a --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr38705.C @@ -0,0 +1,27 @@ +// PR c++/38705 +// { dg-do compile } + +typedef int T; +typedef __SIZE_TYPE__ size_t; +extern "C" void *memcpy (void *, const void *, size_t); + +void +foo (char *p, const int q) +{ + memcpy (p, &q, sizeof (int)); +} + +struct S +{ + T t; + int u; + int bar () const; + template <class T> void foo (const T &x) const {} +}; + +int +S::bar () const +{ + foo (u); + foo (t); +} |