Bug 28950 - regex wrong for testing on darwin in gcc/testsuite/gcc.target/powerpc/ppc-and-1.c
Summary: regex wrong for testing on darwin in gcc/testsuite/gcc.target/powerpc/ppc-and...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 4.2.0
: P3 minor
Target Milestone: 4.1.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-04 16:14 UTC by Jack Howarth
Modified: 2006-09-18 00:26 UTC (History)
3 users (show)

See Also:
Host:
Target: powerpc*-*-darwin*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-09-10 14:35:45


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2006-09-04 16:14:02 UTC
I am able to verify that the regex for gcc/testsuite/gcc.target/powerpc/ppc-and-1.c is 
incorrect as previously diagnosed on the gcc mailing list...

http://gcc.gnu.org/ml/gcc/2006-09/msg00030.html

...and that the following change fixes the problem...

--- gcc-4.2-20060901/gcc/testsuite/gcc.target/powerpc/ppc-and-1.c       2006-08-13 14:10:07.000000000 -0400
+++ gcc-4.2-20060901.allocate/gcc/testsuite/gcc.target/powerpc/ppc-and-1.c      2006-09-01 20:10:44.000000000 -0400
@@ -1,8 +1,8 @@
 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
 /* { dg-options "-O2" } */
 
-/* { dg-final { scan-assembler "rlwinm \[0-9\]+,\[0-9\]+,0,0,30"  } } */
-/* { dg-final { scan-assembler "rlwinm \[0-9\]+,\[0-9\]+,0,29,30"  } } */
+/* { dg-final { scan-assembler "rlwinm r\[0-9\]+,r\[0-9\]+,0,0,30"  } } */
+/* { dg-final { scan-assembler "rlwinm r\[0-9\]+,r\[0-9\]+,0,29,30"  } } */
 /* { dg-final { scan-assembler-not "rldicr" } } */
 
 /* Origin:Pete Steinmetz <steinmtz@us.ibm.com> */


...with this change this test properly passes at -m64 on Darwin...

Executing on host: /sw/src/fink.build/gcc4-4.1.999-20060902/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc4-4.1.999-20060902/darwin_objdir/gcc/ /sw/src/fink.build/
gcc4-4.1.999-20060902/gcc-4.2-20060902/gcc/testsuite/gcc.target/powerpc/ppc-and-1.c   -O2 -fno-show-column -S  -m64 -o ppc-and-1.s    (timeout = 300)
PASS: gcc.target/powerpc/ppc-and-1.c (test for excess errors)
PASS: gcc.target/powerpc/ppc-and-1.c scan-assembler rlwinm r[0-9]+,r[0-9]+,0,0,30
PASS: gcc.target/powerpc/ppc-and-1.c scan-assembler rlwinm r[0-9]+,r[0-9]+,0,29,30
PASS: gcc.target/powerpc/ppc-and-1.c scan-assembler-not rldicr
Comment 1 Eric Christopher 2006-09-10 07:18:40 UTC
But wouldn't that change make it fail on platforms that don't want an "r"?
Comment 2 Andrew Pinski 2006-09-10 07:21:20 UTC
(In reply to comment #1)
> But wouldn't that change make it fail on platforms that don't want an "r"?

Does {,r} work for regex in dejagnu tests?
Comment 3 Andrew Pinski 2006-09-10 14:35:45 UTC
Confirmed, a minor problem with the testsuite.
Comment 4 Janis Johnson 2006-09-12 00:34:27 UTC
Subject: Bug 28950

Author: janis
Date: Tue Sep 12 00:34:18 2006
New Revision: 116867

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116867
Log:
2006-09-11  Jack Howarth  <howarth@bromo.med.uc.edu>

        PR testsuite/28950
        * gcc.target/powerpc/ppc-and-1.c: Fix regex.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/powerpc/ppc-and-1.c

Comment 5 Janis Johnson 2006-09-12 00:42:34 UTC
Subject: Bug 28950

Author: janis
Date: Tue Sep 12 00:42:27 2006
New Revision: 116868

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116868
Log:
2006-09-11  Jack Howarth  <howarth@bromo.med.uc.edu>

        PR testsuite/28950
        * gcc.target/powerpc/ppc-and-1.c: Fix regex.

Modified:
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/gcc.target/powerpc/ppc-and-1.c

Comment 6 Andrew Pinski 2006-09-12 04:06:10 UTC
Fixed.