I have the simple program 

  program a
  call random_seed()
  end program a

in the files a.f90 and b.f90.  That is, a.f90 and b.f90
are identical.

gfortran -o a -fdump-tree-all a.f90 
gfortran -o b -fdump-tree-all -std=f95 b.f90 


--- a.f90.003t.original Mon Jun  5 19:09:22 2006
+++ b.f90.003t.original Mon Jun  5 19:09:15 2006
@@ -1,6 +1,6 @@
 MAIN__ ()
 {
-  _gfortran_set_std (70, 127, 0);
+  _gfortran_set_std (2, 11, 0);
   _gfortran_random_seed (0B, 0B, 0B);
 
 

--- a.f90.004t.gimple   Mon Jun  5 19:09:22 2006
+++ b.f90.004t.gimple   Mon Jun  5 19:09:15 2006
@@ -1,6 +1,6 @@
 MAIN__ ()
 {
-  _gfortran_set_std (70, 127, 0);
+  _gfortran_set_std (2, 11, 0);
   _gfortran_random_seed (0B, 0B, 0B);
 }
 

--- a.f90.007t.vcg      Mon Jun  5 19:09:22 2006
+++ b.f90.007t.vcg      Mon Jun  5 19:09:15 2006
@@ -3,7 +3,6 @@
 node: { title: "EXIT" label: "EXIT" }
 edge: { sourcename: "ENTRY" targetname: "2" linestyle: solid priority: 100 }
 
-node: { title: "2" label: "#2\ncall_expr (1)\nreturn_expr (2)"}
-edge: { sourcename: "2" targetname: "EXIT" priority: 100 linestyle: solid }
+node: { title: "2" label: "#2\ncall_expr (1)\ncall_expr (2)"}
 }
 

--- a.f90.022t.cfg      Mon Jun  5 19:09:22 2006
+++ b.f90.022t.cfg      Mon Jun  5 19:09:15 2006
@@ -5,10 +5,9 @@
 {
   # BLOCK 2
   # PRED: ENTRY (fallthru)
-  _gfortran_set_std (70, 127, 0);
+  _gfortran_set_std (2, 11, 0);
   _gfortran_random_seed (0B, 0B, 0B);
-  return;
-  # SUCC: EXIT
+  # SUCC:
 
 }
 

These last two seem to be related to the infinite recursion 
that I see.  The diff for the assembly is

--- a.s Mon Jun  5 19:25:59 2006
+++ b.s Mon Jun  5 19:26:12 2006
@@ -1,4 +1,4 @@
-       .file   "a.f90"
+       .file   "b.f90"
        .text
 .globl MAIN__
        .type   MAIN__, @function
@@ -9,15 +9,13 @@
        movq    %rsp, %rbp
 .LCFI1:
        movl    $0, %edx
-       movl    $127, %esi
-       movl    $70, %edi
+       movl    $11, %esi
+       movl    $2, %edi
        call    _gfortran_set_std
        movl    $0, %edx
        movl    $0, %esi
        movl    $0, %edi
        call    _gfortran_random_seed
-       leave
-       ret
 .LFE2:
        .size   MAIN__, .-MAIN__
        .section        .eh_frame,"a",@progbits

The absense of "leave" and "ret" can't be a Good Thing.

-- 
Steve

Reply via email to