diff mbox

Minor fixes for regtesting gfortran with -flto

Message ID 20140505161235.BECF4103@mailhost.lps.ens.fr
State New
Headers show

Commit Message

Dominique d'Humières May 5, 2014, 4:12 p.m. UTC
With the following patch, gfortran can be regtested with -flto
with no failure, but pr54852 and pr60061.

OK for trunk?

Dominique

2014-05-05  Dominique d'Humieres <dominiq@lps.ens.fr>

        * gfortran.dg/gfortran.dg/bind_c_array_params_2.f90:
        Adjust regexp for -flto.
        * gfortran.dg/gfortran.dg/pr48636-2.f90: Likewise.
        * gfortran.dg/pr52835.f90: Likewise.

Comments

Andreas Schwab May 25, 2014, 12:10 p.m. UTC | #1
dominiq@lps.ens.fr (Dominique Dhumieres) writes:

> --- ../_clean/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2013-01-25 09:57:48.000000000 +0100
> +++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2014-02-04 19:24:06.000000000 +0100
> @@ -16,7 +16,7 @@ integer :: aa(4,4)
>  call test(aa)
>  end
>  
> -! { dg-final { scan-assembler-times "myBindC" 1 { target { ! { hppa*-*-hpux* } } } } }
> -! { dg-final { scan-assembler-times "myBindC,%r2" 1 { target { hppa*-*-hpux* } } } }
> +! { dg-final { scan-assembler-times "call\[^\n\r\]*myBindC" 1 { target { ! { hppa*-*-hpux* } } } } }
> +! { dg-final { scan-assembler-times "call\[^\n\r\]*myBindC,%r2" 1 { target { hppa*-*-hpux* } } } }

FAIL: gfortran.dg/bind_c_array_params_2.f90  -O   scan-assembler-times call[^\n\r]*myBindC 1

Andreas.
Dominique d'Humières May 25, 2014, 3:48 p.m. UTC | #2
> FAIL: gfortran.dg/bind_c_array_params_2.f90  -O   scan-assembler-times call[^\n\r]*myBindC 1

Sorry for that! Which target? and what is the pattern?

Dominique
Andreas Schwab May 25, 2014, 4:26 p.m. UTC | #3
dominiq@lps.ens.fr (Dominique Dhumieres) writes:

>> FAIL: gfortran.dg/bind_c_array_params_2.f90  -O   scan-assembler-times call[^\n\r]*myBindC 1
>
> Sorry for that! Which target?

Pick any random from gcc-testresults.

> and what is the pattern?

Which pattern?

Andreas.
Dominique d'Humières May 25, 2014, 5:28 p.m. UTC | #4
> > Could you try
> >
> > --- ../_clean/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2014-05-24 16:17:53.000000000 +0200
> > +++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2014-05-25 18:52:16.000000000 +0200
> > @@ -16,7 +16,7 @@ integer :: aa(4,4)
> >  call test(aa)
> >  end
> >  
> > -! { dg-final { scan-assembler-times "call\[^\n\r\]*myBindC" 1 { target { ! { hppa*-*-hpux* } } } } }
> > -! { dg-final { scan-assembler-times "call\[^\n\r\]*myBindC,%r2" 1 { target { hppa*-*-hpux* } } } }
> > +! { dg-final { scan-assembler-times "\[ \t\]_myBindC" 1 { target { ! { hppa*-*-hpux* } } } } }
> > +! { dg-final { scan-assembler-times "\[ \t\]_myBindC,%r2" 1 { target { hppa*-*-hpux* } } } }
> 
> Still fails.

> Pick any random from gcc-testresults.

Not true: I don't see the failure in the results of the Intel bots I have 
looked at and the new regexp succeeds on powerpc-apple-darwin9*.
So could you list the platforms on which the new test fails.

> Which pattern?

Could you post the results (w/wo -flto) of

grep "_myBindC" bind_c_array_params_2.s

TIA

Dominique
Andreas Schwab May 25, 2014, 5:39 p.m. UTC | #5
dominiq@lps.ens.fr (Dominique Dhumieres) writes:

> Could you post the results (w/wo -flto) of
>
> grep "_myBindC" bind_c_array_params_2.s

Empty.

Andreas.
Dominique d'Humières May 25, 2014, 6:16 p.m. UTC | #6
> > grep "_myBindC" bind_c_array_params_2.s
>
> Empty.

And 
grep "myBindC" bind_c_array_params_2.s
?

Dominique
Andreas Schwab May 25, 2014, 7:03 p.m. UTC | #7
dominiq@lps.ens.fr (Dominique Dhumieres) writes:

> grep "myBindC" bind_c_array_params_2.s
	bl myBindC
	jsr myBindC
	bl	myBindC

Andreas.
Hans-Peter Nilsson June 9, 2014, 1:25 a.m. UTC | #8
On Mon, 5 May 2014, Dominique Dhumieres wrote:
> With the following patch, gfortran can be regtested with -flto
> with no failure, but pr54852 and pr60061.
>
> OK for trunk?
>
> Dominique
>
> 2014-05-05  Dominique d'Humieres <dominiq@lps.ens.fr>
>
>         * gfortran.dg/gfortran.dg/bind_c_array_params_2.f90:
>         Adjust regexp for -flto.
>         * gfortran.dg/gfortran.dg/pr48636-2.f90: Likewise.
>         * gfortran.dg/pr52835.f90: Likewise.
>
> --- ../_clean/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2013-01-25 09:57:48.000000000 +0100
> +++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2014-02-04 19:24:06.000000000 +0100
> @@ -16,7 +16,7 @@ integer :: aa(4,4)
>  call test(aa)
>  end
>
> -! { dg-final { scan-assembler-times "myBindC" 1 { target { ! { hppa*-*-hpux* } } } } }
> -! { dg-final { scan-assembler-times "myBindC,%r2" 1 { target { hppa*-*-hpux* } } } }
> +! { dg-final { scan-assembler-times "call\[^\n\r\]*myBindC" 1 { target { ! { hppa*-*-hpux* } } } } }
> +! { dg-final { scan-assembler-times "call\[^\n\r\]*myBindC,%r2" 1 { target { hppa*-*-hpux* } } } }
>  ! { dg-final { scan-tree-dump-times "test \\\(&parm\\." 1 "original" } }
>  ! { dg-final { cleanup-tree-dump "original" } }

No, the related subroutine call instruction does not include the
string "call" for *all* targets, so this now regressed this test
everywhere else.  ISTR there being a better recipe to deal with
LTO in this situation, but I'll leave the grepping to you.
I opened PR61453 for this.

brgds, H-P
diff mbox

Patch

--- ../_clean/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2013-01-25 09:57:48.000000000 +0100
+++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2014-02-04 19:24:06.000000000 +0100
@@ -16,7 +16,7 @@  integer :: aa(4,4)
 call test(aa)
 end
 
-! { dg-final { scan-assembler-times "myBindC" 1 { target { ! { hppa*-*-hpux* } } } } }
-! { dg-final { scan-assembler-times "myBindC,%r2" 1 { target { hppa*-*-hpux* } } } }
+! { dg-final { scan-assembler-times "call\[^\n\r\]*myBindC" 1 { target { ! { hppa*-*-hpux* } } } } }
+! { dg-final { scan-assembler-times "call\[^\n\r\]*myBindC,%r2" 1 { target { hppa*-*-hpux* } } } }
 ! { dg-final { scan-tree-dump-times "test \\\(&parm\\." 1 "original" } }
 ! { dg-final { cleanup-tree-dump "original" } }
--- ../_clean/gcc/testsuite/gfortran.dg/pr48636-2.f90	2012-11-07 18:36:11.000000000 +0100
+++ gcc/testsuite/gfortran.dg/pr48636-2.f90	2014-02-04 17:33:00.000000000 +0100
@@ -33,6 +33,6 @@  program main
   print *,x
 end program main
 
-! { dg-final { scan-ipa-dump "Creating a specialized node of bar/\[0-9\]*\\." "cp" } }
+! { dg-final { scan-ipa-dump "Creating a specialized node of \[^\n\r\]*bar/\[0-9\]*\\." "cp" } }
 ! { dg-final { scan-ipa-dump-times "Aggregate replacements\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=" 2 "cp" } }
 ! { dg-final { cleanup-ipa-dump "cp" } }
--- ../_clean/gcc/testsuite/gfortran.dg/pr52835.f90	2012-04-03 10:50:54.000000000 +0200
+++ gcc/testsuite/gfortran.dg/pr52835.f90	2014-02-04 17:18:15.000000000 +0100
@@ -12,5 +12,5 @@  subroutine foo (x, y, z, n)
   end do
 end subroutine
 
-! { dg-final { scan-tree-dump "bar " "optimized" } }
+! { dg-final { scan-tree-dump "bar\[ _\]" "optimized" } }
 ! { dg-final { cleanup-tree-dump "optimized" } }