OSDN Git Service

PR fortran/12632
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Dec 2003 16:16:39 +0000 (16:16 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Dec 2003 16:16:39 +0000 (16:16 +0000)
commit5383eda412f3aab3dcff93a1ea67223b2830ba32
tree8cc330d809fbbe70f50065f881b684ae3503d29c
parent4a072583bf8dcef68d1736b602eb2a7e8668479b
PR fortran/12632
* fold-const.c (fold) <COND_EXPR>: Don't fold a constant condition,
if the type of the selected branch doesn't match its' parent.

* com.c (ffecom_subscript_check_): Take as an extra argument the
(possibly NULL) decl of the array.  Don't create unnecessary tree
nodes if the array index is known to be safe at compile-time.
If the array index is unsafe, force the array decl into memory to
avoid RTL expansion problems.
(ffecom_array_ref_): Update calls to ffecom_subscript_check_.
(ffecom_char_args_x_): Likewise.

* g77.dg/12632.f: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75203 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/f/ChangeLog
gcc/f/com.c
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g77.dg/12632.f [new file with mode: 0644]