diff mbox

Move pr49309.C testcase to libmudflap (PR testsuite/49753)

Message ID yddk4bfnb1y.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth July 18, 2011, 10:22 a.m. UTC
Jakub Jelinek <jakub@redhat.com> writes:

> On Wed, Jul 13, 2011 at 01:37:22PM -0700, Andrew Pinski wrote:
>> Hi,
>>   The problem here is that the type of the POINTER_PLUS_EXPR is
>> incorrect and also the non folded version leaks to the IR.  This patch
>> fixes those two problems and fixes the ICE.
>> 
>> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
>
> The testcase is wrongly placed and thus fails everywhere.  -fmudflap
> causes inclusion of headers and gcc/testsuite/ isn't set up to find them.

There's a far simpler fix, inspired by gcc.dg/dfp/pr35739.c.  I think it
is better since it gives the testcase wider coverage.  Tested with the
appropriate runtest invocation on i386-pc-solaris2.11 and
alpha-dec-osf5.1b.

Will install on mainline and 4.6 branch unless someone objects.

	Rainer


2011-07-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* g++.dg/torture/pr49309.C: Add -fpreprocessed to dg-options.

Comments

Jakub Jelinek July 18, 2011, 11:15 a.m. UTC | #1
On Mon, Jul 18, 2011 at 12:22:01PM +0200, Rainer Orth wrote:
> >>   The problem here is that the type of the POINTER_PLUS_EXPR is
> >> incorrect and also the non folded version leaks to the IR.  This patch
> >> fixes those two problems and fixes the ICE.
> >> 
> >> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
> >
> > The testcase is wrongly placed and thus fails everywhere.  -fmudflap
> > causes inclusion of headers and gcc/testsuite/ isn't set up to find them.
> 
> There's a far simpler fix, inspired by gcc.dg/dfp/pr35739.c.  I think it
> is better since it gives the testcase wider coverage.  Tested with the
> appropriate runtest invocation on i386-pc-solaris2.11 and
> alpha-dec-osf5.1b.

libmudflap testsuite also iterates over different -O* options and it is IMHO
better to keep mudflap tests together.  But I don't feel too strongly about
it.

	Jakub
Rainer Orth July 18, 2011, 11:21 a.m. UTC | #2
Jakub Jelinek <jakub@redhat.com> writes:

>> There's a far simpler fix, inspired by gcc.dg/dfp/pr35739.c.  I think it
>> is better since it gives the testcase wider coverage.  Tested with the
>> appropriate runtest invocation on i386-pc-solaris2.11 and
>> alpha-dec-osf5.1b.
>
> libmudflap testsuite also iterates over different -O* options and it is IMHO
> better to keep mudflap tests together.  But I don't feel too strongly about
> it.

I like to think of the lib* testsuites as primarily exercising the
runtime libraries, while this is a test for a compiler bug that works
even on platforms that don't have a libmudflap port (yet), like Tru64
UNIX.

	Rainer
diff mbox

Patch

diff --git a/gcc/testsuite/g++.dg/torture/pr49309.C b/gcc/testsuite/g++.dg/torture/pr49309.C
--- a/gcc/testsuite/g++.dg/torture/pr49309.C
+++ b/gcc/testsuite/g++.dg/torture/pr49309.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-fmudflap"  } */
+/* { dg-options "-fpreprocessed -fmudflap" } */
 struct A
 {
   int i;