diff options
author | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-22 19:38:30 +0000 |
---|---|---|
committer | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-22 19:38:30 +0000 |
commit | 88e773b2bdd67c51a8ab88d7ac1d700954403ed9 (patch) | |
tree | 85348fdd542266f03bdc603dff098e293975a29c /gcc | |
parent | 6bb01a79a81473958d449a9e04f76ea79c25d954 (diff) | |
download | gcc-88e773b2bdd67c51a8ab88d7ac1d700954403ed9.tar.gz |
* g++.dg/opt/devirt2.C: Add rule for *-*-mingw* target.
* g++.dg/opt/pr48549.C (long): Replace by long by __PTRDIFF_TYPE__
derived pdiff_t type.
* g++.dg/torture/pr49720.C: Likewise
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184490 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/opt/devirt2.C | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/opt/pr48549.C | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/torture/pr49720.C | 4 |
4 files changed, 17 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9134d73d439..4fd4341b5d9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2012-02-22 Kai Tietz <ktietz@redhat.com> + + * g++.dg/opt/devirt2.C: Add rule for *-*-mingw* target. + * g++.dg/opt/pr48549.C (long): Replace by long by __PTRDIFF_TYPE__ + derived pdiff_t type. + * g++.dg/torture/pr49720.C: Likewise + 2012-02-22 Uros Bizjak <ubizjak@gmail.com> PR target/52330 diff --git a/gcc/testsuite/g++.dg/opt/devirt2.C b/gcc/testsuite/g++.dg/opt/devirt2.C index 092fd686a67..cf4842bd4df 100644 --- a/gcc/testsuite/g++.dg/opt/devirt2.C +++ b/gcc/testsuite/g++.dg/opt/devirt2.C @@ -5,7 +5,9 @@ // { dg-additional-options "-mshort-calls" {target epiphany-*-*} } // Using -mno-abicalls avoids a R_MIPS_JALR .reloc. // { dg-additional-options "-mno-abicalls" { target mips*-*-* } } -// { dg-final { scan-assembler-times "xyzzy" 2 { target { ! { alpha*-*-* hppa*-*-* ia64*-*-hpux* sparc*-*-* } } } } } +// { dg-final { scan-assembler-times "xyzzy" 2 { target { ! { alpha*-*-* hppa*-*-* ia64*-*-hpux* sparc*-*-* *-*-mingw* } } } } } +// For *-*-mingw* there is additionally one .def match +// { dg-final { scan-assembler-times "xyzzy" 3 { target *-*-mingw* } } } // The IA64 and HPPA compilers generate external declarations in addition // to the call so those scans need to be more specific. // { dg-final { scan-assembler-times "br\[^\n\]*xyzzy" 2 { target ia64*-*-hpux* } } } diff --git a/gcc/testsuite/g++.dg/opt/pr48549.C b/gcc/testsuite/g++.dg/opt/pr48549.C index 30799ee93f2..93a38e409b4 100644 --- a/gcc/testsuite/g++.dg/opt/pr48549.C +++ b/gcc/testsuite/g++.dg/opt/pr48549.C @@ -2,10 +2,13 @@ // { dg-do compile } // { dg-options "-fcompare-debug -O2" } +__extension__ typedef __PTRDIFF_TYPE__ pdiff_t; + void foo (void *from, void *to) { - long offset = reinterpret_cast <long>(to) - reinterpret_cast <long>(from); + pdiff_t offset = reinterpret_cast <pdiff_t>(to) + - reinterpret_cast <pdiff_t>(from); if (offset != static_cast <int>(offset)) *(int *) 0xC0DE = 0; reinterpret_cast <int *>(from)[1] = offset; diff --git a/gcc/testsuite/g++.dg/torture/pr49720.C b/gcc/testsuite/g++.dg/torture/pr49720.C index c5da7ba670f..d2c69087d28 100644 --- a/gcc/testsuite/g++.dg/torture/pr49720.C +++ b/gcc/testsuite/g++.dg/torture/pr49720.C @@ -1,8 +1,10 @@ /* { dg-do compile } */ +__extension__ typedef __PTRDIFF_TYPE__ pdiff_t; + extern char t_start[], t_end[], t_size[]; bool foo (void) { - long size = reinterpret_cast<long>(t_size); + pdiff_t size = reinterpret_cast<pdiff_t>(t_size); return (size == t_end - t_start); } |