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]

[Patch, fortran] PR35680 - [4.3/4.4 regression] ICE on invalid transfer in variable declaration

Dear All,

This one was finally fixed by reading the instructions.... err, sorry,
the standard:-)  rather than evaluating the specification expression,
the testcase should be identified as invalid code.

In a restricted expression... (

(7) A reference to an intrinsic function that is
(a) an array inquiry function (13.11.15) other than ALLOCATED,
       ....SIZE in this case....
and where each argument of the function is
(a) a restricted expression or
(b) a variable whose properties inquired about are not.... snip...

In this PR, the arguments of the array inquiry function were not
checked at all.  The implementation, checks first that the actual
argument expression is not a variable (the conditions after ...snip...
are checked elsewhere.) and then emits a MATCH_NO if the expression is
not restricted.  Note that I have been forced to use a
symbol_attribute to flag this error and prevent repetitions of the
message.  Uisng other attributes caused reams of really bizarre error

The testcase is the reporter's with additional tests that the order of
the declarations does not matter, nor whether the source argument of
transfer is typed or not.  In the latter case as different error is

Bootstrapped and regtested on x86_i64/FC9 - OK for trunk and 4.3,
after a decent interval?



2008-10-04  Paul Thomas  <>

	PR fortran/35680
	* gfortran.h : Add 'error' field to symbol_attr structure.
	* expr.c (check_inquiry): When checking a restricted expression
	check that arguments are either variables or restricted.
	(check_restricted): Do not emit error if the symbol has 'error'
	attribute set.  Clean up detection of host-associated variable.

2008-10-04  Paul Thomas  <>

	PR fortran/35680
	* gfortran.dg/transfer_intrinsic_5.f90: New test.

Attachment: submit.diff
Description: Binary data

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