re PR fortran/59440 (ICE in force_decl_die, at dwarf2out.c:20111 with -g)
authorTobias Burnus <burnus@net-b.de>
Thu, 12 Dec 2013 19:41:11 +0000 (20:41 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Thu, 12 Dec 2013 19:41:11 +0000 (20:41 +0100)
2013-12-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/59440
        * trans-decl.c (generate_namelist_decl): Ensure debug DIE
        is created by setting DECL_IGNORED_P to 0.

2013-12-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/59440
        * gfortran.dg/namelist_83.f90: New.
        * gfortran.dg/namelist_83_2.f90: New.

From-SVN: r205939

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

index cd4b385..9d8f1ba 100644 (file)
@@ -1,3 +1,9 @@
+2013-12-12  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/59440
+       * trans-decl.c (generate_namelist_decl): Ensure debug DIE
+       is created by setting DECL_IGNORED_P to 0.
+
 2013-12-11  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/58916
index c1775b3..4da6b62 100644 (file)
@@ -4164,6 +4164,7 @@ generate_namelist_decl (gfc_symbol * sym)
          nml->sym->attr.referenced = 1;
          nml->sym->backend_decl = gfc_get_symbol_decl (nml->sym);
        }
+      DECL_IGNORED_P (nml->sym->backend_decl) = 0;
       CONSTRUCTOR_APPEND_ELT (nml_decls, NULL_TREE, nml->sym->backend_decl);
     }
 
index d8e7546..e011b5e 100644 (file)
@@ -1,3 +1,9 @@
+2013-12-12  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/59440
+       * gfortran.dg/namelist_83.f90: New.
+       * gfortran.dg/namelist_83_2.f90: New.
+
 2013-12-12  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/59470
diff --git a/gcc/testsuite/gfortran.dg/namelist_83.f90 b/gcc/testsuite/gfortran.dg/namelist_83.f90
new file mode 100644 (file)
index 0000000..f87d4cd
--- /dev/null
@@ -0,0 +1,22 @@
+! { dg-do link }
+! { dg-options "-g" }
+! { dg-additional-sources namelist_83_2.f90 }
+!
+! Note: compilation would be sufficient, but "compile" cannot be combined
+! with dg-additional-sources.
+!
+! PR fortran/59440
+!
+! Contributed by Harald Anlauf
+!
+! Was ICEing during DWARF generation.
+!
+! This is the first file - dg-additional-sources contains the second one
+!
+
+module mo_t_datum
+  implicit none
+  integer :: qbit_conv = 0
+end module mo_t_datum
+
+! { dg-final { cleanup-modules "gfcbug126" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_83_2.f90 b/gcc/testsuite/gfortran.dg/namelist_83_2.f90
new file mode 100644 (file)
index 0000000..0a0ca6e
--- /dev/null
@@ -0,0 +1,22 @@
+! { dg-do compile { target { ! *-*-* } } }
+!
+! To be compiled with "-g" via namelist_83.f90
+!
+! PR fortran/59440
+!
+! Contributed by Harald Anlauf
+!
+! Was ICEing during DWARF generation.
+!
+! This is the second file, the module is in namelist_83.f90
+!
+
+!
+MODULE gfcbug126
+  use mo_t_datum, only: qbit_conv
+  implicit none
+  namelist /OBSERVATIONS/ qbit_conv
+end module gfcbug126
+
+! As we have to link, add an empty main program:
+end