[Patch, Fortran] PR56649 - do more simplification of MERGE
Tobias Burnus
burnus@net-b.de
Tue Mar 26 11:21:00 GMT 2013
First, I am woefully aware that there are 7 patches which still have to
be reviewed, three by Thomas, two by Janne, one by Mikael and one by me
(value+optional). I try to find time for reviewing one or two - but
wouldn't mind if others contributed to the deed.
The attached patch fixes one of two issues into which MPICH runs. MERGE
didn't properly simplify valid constant expressions. With this patch,
for scalar constant MERGE, it only looks at the MASK value as more it
not required. For constant-expression arrays, it walks the constructor
and creates a new one, based on the truth value.
Note: The gfc_get_parentheses() is required in some context, e.g.
lbound(merge(i,i, .true.)) shall not not becomes lbound(i) but lbound(
(i) ) otherwise, the result might be wrong. I think there are more such
issues in simplify.c (and possible also in frontend-passes.c).
Build on x86-64-gnu-linux.
OK for the trunk?
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: merge-const.diff
Type: text/x-patch
Size: 5475 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130326/1cb6ad6a/attachment.bin>
More information about the Gcc-patches
mailing list