Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-09 Thread Dominique Dhumieres
 Ok.

 :-)  I usually just expect people to check in such minor stuff once the 
 discussion dies down
 and all the good feedback is incorporated.

Thanks for the tip. I am still learning the rules.

Cheers,

Dominique


Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-08 Thread Dominique Dhumieres
 I just checked.  It doesn't work on hppa64-hp-hpux11.11 due to following
 statement:

  .type   myBindC, @function

So can we settle for

--- ../_clean/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90   
2014-05-24 16:17:53.0 +0200
+++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2014-07-07 
19:15:47.0 +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\]\[$,_0-9\]*myBindC 1 { target { ! 
{ hppa*-*-hpux* } } } } }
+! { dg-final { scan-assembler-times myBindC,%r2 1 { target { hppa*-*-hpux* } 
} } }
 ! { dg-final { scan-tree-dump-times test \\\(parm\\. 1 original } }
 ! { dg-final { cleanup-tree-dump original } }

? If yes, could someone give me the green light. The patch will fix the 
failures 
for the targets it has been tested.

TIA

Dominique


Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-08 Thread John David Anglin

On 7/8/2014 11:36 AM, Dominique Dhumieres wrote:

So can we settle for

--- ../_clean/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90   
2014-05-24 16:17:53.0 +0200
+++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2014-07-07 
19:15:47.0 +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\]\[$,_0-9\]*myBindC 1 { target { ! 
{ hppa*-*-hpux* } } } } }
+! { dg-final { scan-assembler-times myBindC,%r2 1 { target { hppa*-*-hpux* } 
} } }
  ! { dg-final { scan-tree-dump-times test \\\(parm\\. 1 original } }
  ! { dg-final { cleanup-tree-dump original } }
As mentioned before, I would prefer that you change hppa*-*-hpux* to 
hppa*-*-*.


Dave

--
John David Anglindave.ang...@bell.net



Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-08 Thread Dominique Dhumieres
 As mentioned before, I would prefer that you change hppa*-*-hpux* to
 hppa*-*-*.

Done in my tree so I won't forget. Now someone has to approve the patch!

Dominique


Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-08 Thread Mike Stump
On Jul 8, 2014, at 2:07 PM, Dominique Dhumieres domi...@lps.ens.fr wrote:
 As mentioned before, I would prefer that you change hppa*-*-hpux* to
 hppa*-*-*.
 
 Done in my tree so I won't forget. Now someone has to approve the patch!

Ok.

:-)  I usually just expect people to check in such minor stuff once the 
discussion dies down and all the good feedback is incorporated.

Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-07 Thread Dominique Dhumieres
Dave,

 I guess if \[ \t\]_*myBindC worked on hppa*-*-linux*, then it would
 probably work on hpux and the target condition could be removed.

Does this mean that the following patch will succeed on hppa*-*-*
without/with -flto?

--- ../_clean/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90   
2014-05-24 16:17:53.0 +0200
+++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2014-07-07 
12:44:54.0 +0200
@@ -16,7 +16,6 @@ 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 } }
 ! { dg-final { scan-tree-dump-times test \\\(parm\\. 1 original } }
 ! { dg-final { cleanup-tree-dump original } }

Dominique


Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-07 Thread John David Anglin

On 7/7/2014 12:13 PM, Dominique Dhumieres wrote:

Does this mean that the following patch will succeed on hppa*-*-*
without/with -flto?

--- ../_clean/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90   
2014-05-24 16:17:53.0 +0200
+++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2014-07-07 
12:44:54.0 +0200
@@ -16,7 +16,6 @@ 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 } }
  ! { dg-final { scan-tree-dump-times test \\\(parm\\. 1 original } }
  ! { dg-final { cleanup-tree-dump original } }


I just checked.  It doesn't work on hppa64-hp-hpux11.11 due to following
statement:

.type   myBindC, @function

So, we still need hppa specific version .

Dave

--
John David Anglindave.ang...@bell.net



Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-06 Thread Dominique Dhumieres
 On hppa, the ,%r2 uniquely identifies the call.  The test passes
 with -flto.

Then is the following patch OK for hppa*-*-*?

+++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2014-07-05 
22:20:49.0 +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 myBindC,%r2 1 { target { hppa*-*-hpux* } 
} } }
 ! { dg-final { scan-tree-dump-times test \\\(parm\\. 1 original } }
 ! { dg-final { cleanup-tree-dump original } }

Dominique


Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-06 Thread John David Anglin
I would change hppa*-*-hpux* to hppa*-*-*.  That's what I tested on  
hppa-linux.


I guess if \[ \t\]_*myBindC worked on hppa*-*-linux*, then it would  
probably work
on hpux and the target condition could be removed.  The reason hpux  
needed
special treatment originally is for every function call to an external  
symbol, there

is an .import directive containing the symbol name.

Dave

On 6-Jul-14, at 5:22 AM, Dominique Dhumieres wrote:


On hppa, the ,%r2 uniquely identifies the call.  The test passes
with -flto.


Then is the following patch OK for hppa*-*-*?

+++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2014-07-05  
22:20:49.0 +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 myBindC,%r2 1 { target  
{ hppa*-*-hpux* } } } }
! { dg-final { scan-tree-dump-times test \\\(parm\\. 1  
original } }

! { dg-final { cleanup-tree-dump original } }

Dominique



--
John David Anglin   dave.ang...@bell.net





Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-05 Thread John David Anglin


On 5-Jul-14, at 11:56 AM, Dominique Dhumieres wrote:


Is the following patch OK for trunk?

2014-07-05  Dominique d'Humieres domi...@lps.ens.fr

PR testsuite/61453
* gfortran.dg/gfortran.dg/bind_c_array_params_2.f90:
Adjust regexp for more targets.

--- ../_clean/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	 
2014-05-24 16:17:53.0 +0200
+++ gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2014-05-29  
11:34:40.0 +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\]\[$,_0-9\]*myBindC 1  
{ target { ! { hppa*-*-hpux* } } } } }
+! { dg-final { scan-assembler-times \[ \t\]\[$,_0-9\]*myBindC,%r2  
1 { target { hppa*-*-hpux* } } } }


myBindC,%r2 will work on hppa*-*-*.  I don't believe preceding stuff  
is needed on hppa.


Dave
--
John David Anglin   dave.ang...@bell.net





Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-05 Thread Dominique Dhumieres
 myBindC,%r2 will work on hppa*-*-*.  I don't believe preceding stuff
 is needed on hppa.

Sorry, the relation with -flto has been lost in my repost of this patch.
Without something before 'myBindC', the symbol appears twice when compiled
with -flto, once in the assembly itself and once in the addition produced
by -flto. The goal of the stuff before 'myBindC' is to rule out this
addition. Use something such as

make -k check-gfortran RUNTESTFLAGS=dg.exp=bind_c_array_params_2.f90 
--target_board=unix'{-m32,-m64,-m32/-flto,-m64/-flto}'

to see the difference.

Dominique


Re: [Patch, testsuite] PR61453 gfortran.dg/bind_c_array_params_2.f90 for targets where a call insn isn't call

2014-07-05 Thread John David Anglin

On 5-Jul-14, at 1:55 PM, Dominique Dhumieres wrote:

myBindC,%r2 will work on hppa*-*-*.  I don't believe preceding  
stuff

is needed on hppa.


Sorry, the relation with -flto has been lost in my repost of this  
patch.
Without something before 'myBindC', the symbol appears twice when  
compiled
with -flto, once in the assembly itself and once in the addition  
produced

by -flto. The goal of the stuff before 'myBindC' is to rule out this
addition. Use something such as

make -k check-gfortran  
RUNTESTFLAGS=dg.exp=bind_c_array_params_2.f90 --target_board=unix'{- 
m32,-m64,-m32/-flto,-m64/-flto}'


to see the difference.



On hppa, the ,%r2 uniquely identifies the call.  The test passes  
with -flto.


Dave
--
John David Anglin   dave.ang...@bell.net