2007-11-22 Tobias Burnus <burnus@net-b.de>
* primary.c (gfc_match_structure_constructor): Allow
constructor for types without components.
2007-11-22 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/derived_constructor_comps_3.f90: New.
From-SVN: r130358
+2007-11-22 Tobias Burnus <burnus@net-b.de>
+
+ * primary.c (gfc_match_structure_constructor): Allow
+ constructor for types without components.
+
2007-11-22 Tobias Burnus <burnus@net-b.de>
PR fortran/34079
if (gfc_match_char (')') != MATCH_YES)
goto syntax;
- if (comp->next != NULL)
+ if (comp && comp->next != NULL)
{
gfc_error ("Too few components in structure constructor at %C");
goto cleanup;
+2007-11-22 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/derived_constructor_comps_3.f90: New.
+
2007-11-22 Jakub Jelinek <jakub@redhat.com>
PR c++/34094
--- /dev/null
+! { dg-compile }
+!
+! gfortran was ICEing for the constructor of
+! componentfree types.
+!
+! Contributed by James Van Buskirk
+! http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/c8dd08d6da052499/
+!
+ module bug4_mod
+ implicit none
+ type bug4 ! no components
+ end type bug4
+end module bug4_mod
+
+program bug4_structure
+ use bug4_mod
+ implicit none
+ type(bug4) t
+ t = bug4()
+ write(*,*) t
+end program bug4_structure
+! { dg-final { cleanup-modules "bug4_mod" } }