diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-12-29 16:16:39 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-12-29 16:16:39 +0000 |
commit | b66906a8ff79931bc3d23b9362833b1567c5ac56 (patch) | |
tree | 8cc330d809fbbe70f50065f881b684ae3503d29c /gcc/testsuite/g77.dg | |
parent | 68deab91f26e8a5266a8bd9086bbf5129c619c03 (diff) | |
download | gcc-b66906a8ff79931bc3d23b9362833b1567c5ac56.zip gcc-b66906a8ff79931bc3d23b9362833b1567c5ac56.tar.gz gcc-b66906a8ff79931bc3d23b9362833b1567c5ac56.tar.bz2 |
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
Diffstat (limited to 'gcc/testsuite/g77.dg')
-rw-r--r-- | gcc/testsuite/g77.dg/12632.f | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/g77.dg/12632.f b/gcc/testsuite/g77.dg/12632.f new file mode 100644 index 0000000..6801229 --- /dev/null +++ b/gcc/testsuite/g77.dg/12632.f @@ -0,0 +1,6 @@ +C { dg-do compile } +C { dg-options "-fbounds-check" } + INTEGER I(1) + I(2) = 0 ! { dg-error "out of defined range" "out of defined range" } + END + |