re PR fortran/29876 (ICE on bad operator in ONLY clause of USE statement)

gcc/fortran:
2007-07-08  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/29876
	* module.c (gfc_match_use): Do not set an non-existant 
	intrinsic operator if a user-defined operator is found.

gcc/testsuite:
2007-07-08  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/29876
	* gfortran.dg/operator_6.f90: New test.

From-SVN: r126472
This commit is contained in:
Daniel Franke 2007-07-08 18:58:45 -04:00 committed by Daniel Franke
parent 534fd53491
commit 090b4ea8ea
4 changed files with 23 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2007-07-08 Daniel Franke <franke.daniel@gmail.com>
PR fortran/29876
* module.c (gfc_match_use): Do not set an non-existant
intrinsic operator if a user-defined operator is found.
2007-07-08 Daniel Franke <franke.daniel@gmail.com>
PR fortran/24784

View File

@ -651,10 +651,6 @@ gfc_match_use (void)
"an external module name.", module_name);
goto cleanup;
}
if (type == INTERFACE_USER_OP)
new->operator = operator;
break;
case INTERFACE_INTRINSIC_OP:

View File

@ -8,6 +8,11 @@
PR libfortran/32217
* gfortran.dg/unpack_zerosize_1.f90: New test case.
2007-07-08 Daniel Franke <franke.daniel@gmail.com>
PR fortran/29876
* gfortran.dg/operator_6.f90: New test.
2007-07-08 Daniel Franke <franke.daniel@gmail.com>
PR fortran/17711

View File

@ -0,0 +1,12 @@
! { dg-do compile }
!
! PR fortran/29876 ICE on bad operator in ONLY clause of USE statement
! Testcase contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
!
module foo
end module foo
program test
use foo, only : operator(.none.) ! { dg-error "not found in module" }
end program test
! { dg-final { cleanup-modules "foo" } }