[Patch, Fortran] PR 51966 - Fix struct constructor with character-parameter
Tobias Burnus
burnus@net-b.de
Tue Jan 24 18:22:00 GMT 2012
Hi all,
first: I am still looking for someone to review my patch at
http://gcc.gnu.org/ml/fortran/2012-01/msg00197.html
* * *
In PR 44857, a patch was added which changed:
= dt_constructor ( character_parameter_array )
to
= dt_constructor ( (/ character(len=n) :: character_parameter_array /) )
if the component had a different length that the PARAMETER of type
character. (Without that change, either out of bound issues occurred or
one the blank padding was missing.)
Unfortunately, the this change was also applied to scalar expressions
such as
= dt_constructor ( character_parameter_array(index) )
which causes an ICE.
The solution is simple: Only do this kind of optimization for arrays.
Build and regtested on x86-64-linux.
OK for the trunk and 4.6?
* * *
Current regression status:
- 8 gfortran regressions (including this one) of which I only regard the
front-end-optimization wong-code issue as serious. One 4.6-only
ice-on-valid-code issue - and 5 other regressions which I regard as of
lesser importance.
- 82 serious regression, 6 P1, 64 P2, 12 P3 - and 108 other regressions
(64 P4 and 54 P5).
Tobias
PS: I think the patch is obvious enough that I will commit it tomorrow,
unless I get an OK today or someone finds a reason why the patch is not
the best solution.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: derived-char.diff
Type: text/x-patch
Size: 1791 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120124/17036614/attachment.bin>
More information about the Gcc-patches
mailing list