This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix gfortran ICE with a call to alternate return subroutine(take 2)

Jakub Jelinek wrote:
> Ok for HEAD and 4.0 once 4.0 branch reopens?
> 2005-06-06  Jakub Jelinek  <>
> 	* trans-expr.c (gfc_conv_function_call): Return int instead of
> 	void.  Use a local variable for has_alternate_specifier and
> 	return it.  Avoid modification of function type's return value
> 	in place, since it may be shared.
> 	* trans.h (has_alternate_specifier): Remove.
> 	(gfc_conv_function_call): Change return type.
> 	* trans-stmt.c (has_alternate_specifier): Remove.
> 	(gfc_trans_call): Add a local has_alternate_specifier variable,
> 	set it from gfc_conv_function_call return value.
> 	* gfortran.dg/altreturn_1.f90: New test.

OK.  If we had a mechanism for generating artificial variables in the
frontend, this magic could probably be made much easier (*), but this is good
as well.

- Tobi

(*) essentially, replace
    CALL SUB(*)
    t = SUB  ! this is the internal representation, not user code
Currently we build the SELECT in the FE, but the connection between it and the
call is established only during code generation.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]