Patchwork [Fortran] Add parsing support for assumed-rank array

login
register
mail settings
Submitter Tobias Burnus
Date July 20, 2012, 8:07 p.m.
Message ID <5009BA9F.9090003@net-b.de>
Download mbox | patch
Permalink /patch/172339/
State New
Headers show

Comments

Tobias Burnus - July 20, 2012, 8:07 p.m.
Igor Zamyatin wrote:
>> I have now committed the attached version as Rev. 189700!
> This seems to cause following fails at least on i686:

I have now committed as obvious (Rev. 189725) a patch to solve the issue 
for assumed_rank_12.f90; I have also a patch for the other issue 
(assumed_rank_6.f90), but that's pending review: 
http://gcc.gnu.org/ml/fortran/2012-07/msg00100.html

For some reasons, the value of the array type in the descriptor (dtype) 
is differs on i686 from the value on x86-64.

Sorry for the breakage and thanks for the report.

Tobias





>
> FAIL: gfortran.dg/assumed_rank_12.f90  -O0   scan-tree-dump original "
> = f \\(\\);.*desc.0.dtype = 600;.*desc.0.data = .void .. D.*;.*sub
> \\(&desc.0\\);.*D.*= .integer.kind=4. .. desc.0.data;"
> FAIL: gfortran.dg/assumed_rank_12.f90  -O1   scan-tree-dump original "
> = f \\(\\);.*desc.0.dtype = 600;.*desc.0.data = .void .. D.*;.*sub
> \\(&desc.0\\);.*D.*= .integer.kind=4. .. desc.0.data;"
> FAIL: gfortran.dg/assumed_rank_12.f90  -O2   scan-tree-dump original "
> = f \\(\\);.*desc.0.dtype = 600;.*desc.0.data = .void .. D.*;.*sub
> \\(&desc.0\\);.*D.*= .integer.kind=4. .. desc.0.data;"
> FAIL: gfortran.dg/assumed_rank_12.f90  -O3 -fomit-frame-pointer
> scan-tree-dump original " = f \\(\\);.*desc.0.dtype =
> 600;.*desc.0.data = .void .. D.*;.*sub \\(&desc.0\\);.*D.*=
> .integer.kind=4. .. desc.0.data;"
> FAIL: gfortran.dg/assumed_rank_12.f90  -O3 -fomit-frame-pointer
> -funroll-all-loops -finline-functions   scan-tree-dump original " = f
> \\(\\);.*desc.0.dtype = 600;.*desc.0.data = .void .. D.*;.*sub
> \\(&desc.0\\);.*D.*= .integer.kind=4. .. desc.0.data;"
> FAIL: gfortran.dg/assumed_rank_12.f90  -O3 -fomit-frame-pointer
> -funroll-loops   scan-tree-dump original " = f \\(\\);.*desc.0.dtype =
> 600;.*desc.0.data = .void .. D.*;.*sub \\(&desc.0\\);.*D.*=
> .integer.kind=4. .. desc.0.data;"
> FAIL: gfortran.dg/assumed_rank_12.f90  -O3 -g   scan-tree-dump
> original " = f \\(\\);.*desc.0.dtype = 600;.*desc.0.data = .void ..
> D.*;.*sub \\(&desc.0\\);.*D.*= .integer.kind=4. .. desc.0.data;"
> FAIL: gfortran.dg/assumed_rank_12.f90  -Os   scan-tree-dump original "
> = f \\(\\);.*desc.0.dtype = 600;.*desc.0.data = .void .. D.*;.*sub
> \\(&desc.0\\);.*D.*= .integer.kind=4. .. desc.0.data;"
> FAIL: gfortran.dg/assumed_rank_6.f90  -O   (test for errors, line 19)
> FAIL: gfortran.dg/assumed_rank_6.f90  -O   (test for errors, line 20)
> FAIL: gfortran.dg/assumed_rank_6.f90  -O   (test for errors, line 21)
> FAIL: gfortran.dg/assumed_rank_6.f90  -O   (test for errors, line 26)
> FAIL: gfortran.dg/assumed_rank_6.f90  -O   (test for errors, line 33)
> FAIL: gfortran.dg/assumed_rank_6.f90  -O   (test for errors, line 37)
> FAIL: gfortran.dg/assumed_rank_6.f90  -O   (test for errors, line 9)
> FAIL: gfortran.dg/assumed_rank_6.f90  -O  (internal compiler error)
> FAIL: gfortran.dg/assumed_rank_6.f90  -O  (test for excess errors)
> FAIL: gfortran.dg/lto/pr45586-2
> f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o link, -O0 -flto
> -fuse-linker-plugin -fno-fat-lto-objects  (internal compiler error)
>

Patch

Index: gfortran.dg/assumed_rank_12.f90
===================================================================
--- gfortran.dg/assumed_rank_12.f90     (Revision 189724)
+++ gfortran.dg/assumed_rank_12.f90     (Arbeitskopie)
@@ -16,6 +16,6 @@ 
  end function f
  end

-! { dg-final { scan-tree-dump " = f \\(\\);.*desc.0.dtype = 
600;.*desc.0.data = .void .. D.*;.*sub \\(&desc.0\\);.*D.*= 
.integer.kind=4. .. desc.0.data;" "original" } }
+! { dg-final { scan-tree-dump " = f \\(\\);.*desc.0.dtype = 
.*;.*desc.0.data = .void .. D.*;.*sub \\(&desc.0\\);.*D.*= 
.integer.kind=4. .. desc.0.data;" "original" } }
  ! { dg-final { cleanup-tree-dump "original" } }

Index: ChangeLog
===================================================================
--- ChangeLog   (Revision 189724)
+++ ChangeLog   (Arbeitskopie)
@@ -1,3 +1,7 @@ 
+2012-07-20  Tobias Burnus  <burnus@net-b.de>
+
+       * gfortran.dg/assumed_rank_12.f90: Update dg-error.
+
  2012-07-20  Jason Merrill  <jason@redhat.com>

         PR c++/54038