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
This commit is contained in:
Thomas Koenig 2010-09-07 22:50:54 +00:00
parent ccef29e831
commit c56c085331
4 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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.

View File

@ -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;
}

View File

@ -1,3 +1,8 @@
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

View File

@ -0,0 +1,9 @@
! { 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