Commit c56c0853 by Thomas Koenig

re PR fortran/45576 (ICE on character stuff)

2010-09-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/45576
	* dependency.c (gfc_deb_compare_expr):  Take missing optional
	arguments into account.

2010-09-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/45576
	* gfortran.dg/char_length_18.f90:  New test.

From-SVN: r163978
parent ccef29e8
2010-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45576
* dependency.c (gfc_deb_compare_expr): Take missing optional
arguments into account.
2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
......
......@@ -368,8 +368,14 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2)
/* Compare the argument lists for equality. */
while (args1 && args2)
{
if (gfc_dep_compare_expr (args1->expr, args2->expr) != 0)
/* Bitwise xor, since C has no non-bitwise xor operator. */
if ((args1->expr == NULL) ^ (args2->expr == NULL))
return -2;
if (args1->expr != NULL && args2->expr != NULL
&& gfc_dep_compare_expr (args1->expr, args2->expr) != 0)
return -2;
args1 = args1->next;
args2 = args2->next;
}
......
2010-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45576
* gfortran.dg/char_length_18.f90: New test.
2010-09-07 Jack Howarth <howarth@bromo.med.uc.edu>
PR target/36502
......
! { dg-do compile }
! PR 45576 - no ICE for missing optional argument
! Test case supplied by Joost VandeVondele
SUBROUTINE get_r_val()
INTEGER, PARAMETER :: default_string_length=128
CHARACTER(len=default_string_length) :: c_val
LOGICAL :: check
check = c_val(LEN_TRIM(c_val):LEN_TRIM(c_val))=="]"
END SUBROUTINE get_r_val
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