Commit 1f8e994c by Tobias Burnus

re PR fortran/31559 ([4.1 only] Assigning to an EXTERNAL leads to ICE)

2007-04-13  Tobias Burnus  <burnus@net-b.de>

	PR fortran/31559
	* primary.c (match_variable): External functions
	are no variables.

2007-04-13  Tobias Burnus  <burnus@net-b.de>

	PR fortran/31559
	* gfortran.dg/func_assign.f90: New test.

From-SVN: r123793
parent c40ce8f3
2007-04-13 Paul Thomas <pault@gcc.gnu.org> 2007-04-13 Tobias Burnus <burnus@net-b.de>
PR fortran/31550 PR fortran/31559
* trans-types.c (copy_dt_decls_ifequal): Do not get pointer * primary.c (match_variable): External functions
derived type components. are no variables.
2007-04-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31550
* trans-types.c (copy_dt_decls_ifequal): Do not get pointer
derived type components.
2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org> 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
PR fortran/18937 PR fortran/18937
...@@ -106,18 +112,18 @@ ...@@ -106,18 +112,18 @@
* parse.c (parse_progunit): Call it after parsing specification * parse.c (parse_progunit): Call it after parsing specification
statements. statements.
2007-04-05 Paul Thomas <pault@gcc.gnu.org> 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31483 PR fortran/31483
* trans-expr.c (gfc_conv_function_call): Give a dummy * trans-expr.c (gfc_conv_function_call): Give a dummy
procedure the correct type if it has alternate returns. procedure the correct type if it has alternate returns.
2007-04-05 Paul Thomas <pault@gcc.gnu.org> 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31292 PR fortran/31292
* decl.c (gfc_match_modproc): Go up to the top of the namespace * decl.c (gfc_match_modproc): Go up to the top of the namespace
tree to find the module namespace for gfc_get_symbol. tree to find the module namespace for gfc_get_symbol.
2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/31304 PR fortran/31304
......
...@@ -2420,7 +2420,8 @@ match_variable (gfc_expr **result, int equiv_flag, int host_flag) ...@@ -2420,7 +2420,8 @@ match_variable (gfc_expr **result, int equiv_flag, int host_flag)
case FL_PROCEDURE: case FL_PROCEDURE:
/* Check for a nonrecursive function result */ /* Check for a nonrecursive function result */
if (sym->attr.function && (sym->result == sym || sym->attr.entry)) if (sym->attr.function && (sym->result == sym || sym->attr.entry)
&& !sym->attr.external)
{ {
/* If a function result is a derived type, then the derived /* If a function result is a derived type, then the derived
type may still have to be resolved. */ type may still have to be resolved. */
......
2007-04-13 Paul Thomas <pault@gcc.gnu.org> 2007-04-13 Tobias Burnus <burnus@net-b.de>
PR fortran/31550 PR fortran/31559
* gfortran.dg/used_types_16.f90: New test. * gfortran.dg/func_assign.f90: New test.
2007-04-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31550
* gfortran.dg/used_types_16.f90: New test.
2007-04-13 Tobias Schlter <tobi@gcc.gnu.org> 2007-04-13 Tobias Schlter <tobi@gcc.gnu.org>
PR fortran/18937 PR fortran/18937
! { dg-do compile }
!
! PR fortran/31559
! Do not allow assigning to external functions
!
! Contributed by Steve Kargl <sgk@troutmask.apl.washington.edu>
!
module mod
implicit none
contains
integer function bar()
bar = 4
end function bar
subroutine a()
implicit none
real :: fun
external fun
interface
function funget(a)
integer :: a
end function
subroutine sub()
end subroutine sub
end interface
sub = 'a' ! { dg-error "Expected VARIABLE" }
fun = 4.4 ! { dg-error "Expected VARIABLE" }
funget = 4 ! { dg-error "is not a VALUE" }
bar = 5 ! { dg-error "is not a VALUE" }
end subroutine a
end module mod
end
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