Commit 7c8d2703 by Daniel Franke

re PR fortran/34202 (ICE (segfault) for invalid code in formalize_init_expr (data.c:691))

gcc/fortran:
2008-01-24  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/34202
	* data.c (formalize_structure_cons): Skip formalization on
	empty structures.

gcc/testsuite:
2008-01-24  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/34202
        * gfortran.dg/empty_type.f90: New test.

From-SVN: r131810
parent ae7a8ebc
2008-01-24 Daniel Franke <franke.daniel@gmail.com>
PR fortran/34202
* data.c (formalize_structure_cons): Skip formalization on
empty structures.
2008-01-24 Daniel Franke <franke.daniel@gmail.com>
* gfortran.texi (OpenMP): Extended existing documentation.
(contributors): Added major contributors of 2008 that were
not listed yet.
......
......@@ -688,7 +688,7 @@ formalize_structure_cons (gfc_expr *expr)
c = expr->value.constructor;
/* Constructor is already formalized. */
if (c->n.component == NULL)
if (!c || c->n.component == NULL)
return;
head = tail = NULL;
......
2008-01-24 Daniel Franke <franke.daniel@gmail.com>
PR fortran/34202
* gfortran.dg/empty_type.f90: New test.
2008-01-24 Paolo Carlini <pcarlini@suse.de>
PR c++/34603
* g++.dg/template/crash77.C: New.
PR c++/34603
* g++.dg/template/crash77.C: New.
2008-01-24 Uros Bizjak <ubizjak@gmail.com>
! { dg-do compile }
! PR fortran/34202
! ICE on contruction of empty types
! Testcase contributed by Tobias Burnus
program bug4a
implicit none
type bug4
! Intentionally left empty
end type bug4
type compound
type(bug4) b
end type compound
type(bug4), parameter :: f = bug4()
type(compound), parameter :: g = compound(bug4())
end program bug4a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment