OSDN Git Service

2010-07-26 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Jul 2010 10:30:45 +0000 (10:30 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Jul 2010 10:30:45 +0000 (10:30 +0000)
        PR fortran/45066
        * trans-io.c (build_dt): Use NULL_TREE rather than NULL
        for call to transfer_namelist_element.
        * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
        for -fwhole-file.

2010-07-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/45066
        * gfortran.dg/namelist_62.f90: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162532 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/fortran/trans-io.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/namelist_62.f90 [new file with mode: 0644]

index f29ccca..999d38e 100644 (file)
@@ -1,3 +1,11 @@
+2010-07-26  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/45066
+       * trans-io.c (build_dt): Use NULL_TREE rather than NULL
+       for call to transfer_namelist_element.
+       * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
+       for -fwhole-file.
+
 2010-07-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/40628
index a1789ea..4a3fcd8 100644 (file)
@@ -1150,7 +1150,8 @@ gfc_get_symbol_decl (gfc_symbol * sym)
                                           true);
              if (sym->ts.type == BT_CHARACTER)
                sym->ts.u.cl->backend_decl = s->ts.u.cl->backend_decl;
-             return s->backend_decl;
+             sym->backend_decl = s->backend_decl;
+             return sym->backend_decl;
            }
        }
     }
index a806d42..00c44e7 100644 (file)
@@ -1760,7 +1760,7 @@ build_dt (tree function, gfc_code * code)
 
          for (nml = dt->namelist->namelist; nml; nml = nml->next)
            transfer_namelist_element (&block, nml->sym->name, nml->sym,
-                                      NULL, NULL);
+                                      NULL, NULL_TREE);
        }
       else
        set_parameter_const (&block, var, IOPARM_common_flags, mask);
index 7897b05..b9de6e4 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-26  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/45066
+       * gfortran.dg/namelist_62.f90: New.
+
 2010-07-26  Richard Guenther  <rguenther@suse.de>
 
        * gcc.c-torture/execute/pr45017.c: Move ...
diff --git a/gcc/testsuite/gfortran.dg/namelist_62.f90 b/gcc/testsuite/gfortran.dg/namelist_62.f90
new file mode 100644 (file)
index 0000000..23e2562
--- /dev/null
@@ -0,0 +1,20 @@
+! { dg-do compile }
+!
+! PR fortran/45066
+!
+! Contributed by Michael Richmond.
+!
+! Was failing due to a -fwhole-file bug.
+!
+
+MODULE GA_commons
+  INTEGER :: nichflg(2)
+END MODULE GA_commons
+
+PROGRAM gafortran
+  USE GA_commons
+  NAMELIST /ga/ nichflg
+  READ (23, nml=ga)
+END PROGRAM gafortran
+
+! { dg-final { cleanup-modules "ga_commons" } }