| Submitter | IainS |
|---|---|
| Date | July 3, 2010, 8:28 a.m. |
| Message ID | <CB569B70-B993-4F15-9ECC-086B510ABD90@sandoe-acoustics.co.uk> |
| Download | mbox | patch |
| Permalink | /patch/57795/ |
| State | New |
| Headers | show |
Comments
too quick on the "send" button, On 3 Jul 2010, at 09:28, IainS wrote: > This should fix PR44518 on trunk. > Since I don't have access to real hardware for some of the affected > targets, I'm going to hold off on the branch for a couple of test > cycles. > > tested on {powepc*,i686}-apple-darwin{8,9}, x86_64-apple-darwin10, > {i686,x86_64}-unknown-linux-gnu, cris-elf(sim), s390x(compile-only), > armel-linux-eabi(compile-only), mipsisa64-elf(sim). > > I don't have the means to test hppa or to run executables on s390x - > since these are affected targets, I'd appreciate any feedback on > success/failure of the fixes. > > Thanks to Mikael Pettersson for input on the solutions. > See also http://gcc.gnu.org/ml/gcc/2010-06/msg00804.html for Ian's > comment on the scan-file solution. > Applied under Mike's pre-approval for ObjC testsuite fixes (and as a > fix for an earlier patch) applied as r161769 > testsuite/ChangeLog: > > 2010-07-03 Iain Sandoe <iains@gcc.gnu.org> > Mikael Pettersson <mikpe@it.uu.se> > > PR testsuite/44518 > * obj-c++.dg/encode-2.mm: Produce object and save temps. > Make signed-ness of chars explicit. Scan the object for > strings that are split by some target assemblers. > * obj-c++.dg/encode-3.mm: Make the signed-ness of chars > explicit.
On 3 Jul 2010, at 09:28, IainS wrote: > This should fix PR44518 on trunk. > Since I don't have access to real hardware for some of the affected > targets, I'm going to hold off on the branch for a couple of test > cycles. (in addition to my original local testing) results post r161769: http://gcc.gnu.org/ml/gcc-testresults/2010-07/msg00862.html (s390) http://gcc.gnu.org/ml/gcc-testresults/2010-07/msg00770.html (s390x) http://gcc.gnu.org/ml/gcc-testresults/2010-07/msg00753.html (powerpc64- linux-gnu) http://gcc.gnu.org/ml/gcc-testresults/2010-07/msg00747.html (ia64-suse- linux-gnu) http://gcc.gnu.org/ml/gcc-testresults/2010-07/msg00700.html (hppa- unknown-linux-gnu) it seems that the approach is working on a variety of targets... so I've back-ported to 4.5 branch as r162037. cheers, Iain.
Patch
Index: gcc/testsuite/obj-c++.dg/encode-2.mm =================================================================== --- gcc/testsuite/obj-c++.dg/encode-2.mm (revision 161768) +++ gcc/testsuite/obj-c++.dg/encode-2.mm (working copy) @@ -1,4 +1,5 @@ -/* { dg-do compile } */ +/* { dg-do assemble } */ +/* { dg-options "-save-temps" } */ template <class T> struct Vec { @@ -11,7 +12,7 @@ typedef struct { Vec<float> fvec; float fscalar; double dscalar; - Vec<char> chVec; + Vec<signed char> chVec; int iscalar; } anonymous; @@ -23,4 +24,5 @@ const char *enc3 = @encode(anonymous); /* { dg-final { scan-assembler "{Vec<float>=ffi}" } } */ /* { dg-final { scan-assembler "{Vec<double>=ddi}" } } */ -/* { dg-final { scan-assembler "{?={Vec<double>=ddi} {Vec<float>=ffi}fd{Vec<char>=cci}i}" } } */ +/* { dg-final { scan-file "encode-2.o" "{?={Vec<double>=ddi} {Vec<float>=ffi}fd{Vec<signed char>=cci}i}" } } +/* { dg-final cleanup-saved-temps } */ Index: gcc/testsuite/obj-c++.dg/encode-3.mm =================================================================== --- gcc/testsuite/obj-c++.dg/encode-3.mm (revision 161768) +++ gcc/testsuite/obj-c++.dg/encode-3.mm (working copy) @@ -18,7 +18,7 @@ typedef struct { int iscalar; long z; long long zz; - Vec<const char> cv; + Vec<const signed char> cv; } anonymous; //Vec<double> dd; @@ -44,7 +44,7 @@ int main(void) { if (strcmp (enc2, "{Vec<double>=dd" L "q}")) _exit(-(__LINE__)); - if (strcmp (enc3, "{?=f[10d]i" L "q{Vec<const char>=rcrc" L "q}}")) + if (strcmp (enc3, "{?=f[10d]i" L "q{Vec<const signed char>=rcrc" L "q}}")) _exit(-(__LINE__));
This should fix PR44518 on trunk. Since I don't have access to real hardware for some of the affected targets, I'm going to hold off on the branch for a couple of test cycles. tested on {powepc*,i686}-apple-darwin{8,9}, x86_64-apple-darwin10, {i686,x86_64}-unknown-linux-gnu, cris-elf(sim), s390x(compile-only), armel-linux-eabi(compile-only), mipsisa64-elf(sim). I don't have the means to test hppa or to run executables on s390x - since these are affected targets, I'd appreciate any feedback on success/failure of the fixes. Thanks to Mikael Pettersson for input on the solutions. See also http://gcc.gnu.org/ml/gcc/2010-06/msg00804.html for Ian's comment on the scan-file solution. Applied under Mike's pre-approval for ObjC testsuite fixes (and as a fix for an earlier patch). cheers, Iain testsuite/ChangeLog: 2010-07-03 Iain Sandoe <iains@gcc.gnu.org> Mikael Pettersson <mikpe@it.uu.se> PR testsuite/44518 * obj-c++.dg/encode-2.mm: Produce object and save temps. Make signed-ness of chars explicit. Scan the object for strings that are split by some target assemblers. * obj-c++.dg/encode-3.mm: Make the signed-ness of chars explicit. return 0;