module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.

* module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.

	* gfortran.dg/module_implicit_conversion.f90: New test.

From-SVN: r122915
This commit is contained in:
Jakub Jelinek 2007-03-14 13:16:24 +01:00 committed by Jakub Jelinek
parent d70d13acb5
commit 3ea04f082b
4 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2007-03-14 Jakub Jelinek <jakub@redhat.com>
* module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
PR fortran/30933

View File

@ -1814,7 +1814,14 @@ mio_typespec (gfc_typespec *ts)
else
mio_symbol_ref (&ts->derived);
mio_charlen (&ts->cl);
if (ts->type != BT_CHARACTER)
{
/* ts->cl is only valid for BT_CHARACTER. */
mio_lparen ();
mio_rparen ();
}
else
mio_charlen (&ts->cl);
mio_rparen ();
}

View File

@ -1,3 +1,7 @@
2007-03-14 Jakub Jelinek <jakub@redhat.com>
* gfortran.dg/module_implicit_conversion.f90: New test.
2007-03-13 Alexandre Oliva <aoliva@redhat.com>
PR middle-end/31127

View File

@ -0,0 +1,9 @@
! { dg-do compile }
! { dg-options "-std=gnu" }
module module_implicit_conversion
! double complex :: s = (1.0D0, 0D0)
double complex :: s = (1.0, 0D0)
end module module_implicit_conversion
! { dg-final { cleanup-modules "module_implicit_conversion" } }