]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/12632 ([g77 only] -fbounds-check ICE)
authorRoger Sayle <roger@eyesopen.com>
Mon, 29 Dec 2003 16:16:39 +0000 (16:16 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 29 Dec 2003 16:16:39 +0000 (16:16 +0000)
commitb66906a8ff79931bc3d23b9362833b1567c5ac56
tree8cc330d809fbbe70f50065f881b684ae3503d29c
parent68deab91f26e8a5266a8bd9086bbf5129c619c03
re PR fortran/12632 ([g77 only] -fbounds-check ICE)

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.

From-SVN: r75203
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]