diff options
author | Steven G. Kargl <kargls@comcast.net> | 2006-07-24 16:54:01 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2006-07-24 16:54:01 +0000 |
commit | 0dca5a9226d50bf959193099c5870906171aa880 (patch) | |
tree | f6c3b9f105df06f361f39dc570160f40cb95ace2 /gcc | |
parent | a0cbafebd7272e3a556f5737d19bbac555c2de44 (diff) | |
download | gcc-0dca5a9226d50bf959193099c5870906171aa880.zip gcc-0dca5a9226d50bf959193099c5870906171aa880.tar.gz gcc-0dca5a9226d50bf959193099c5870906171aa880.tar.bz2 |
re PR fortran/28439 ([4.1 only] Multiple evaluations of arithmetic if condition)
2006-07-24 Steven G. Kargl <kargls@comcast.net>
PR fortran/28439
* gfortran.dg/arithmetic_if.f90: New test.
From-SVN: r115718
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/arithmetic_if.f90 | 31 |
2 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f044f5..89ed839 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-07-24 Steven G. Kargl <kargls@comcast.net> + + PR fortran/28439 + * gfortran.dg/arithmetic_if.f90: New test. + 2006-07-24 Uros Bizjak <uros@kss-loka.si> * gcc.dg/visibility-11.c: Enlarge test array to 1024 bytes to diff --git a/gcc/testsuite/gfortran.dg/arithmetic_if.f90 b/gcc/testsuite/gfortran.dg/arithmetic_if.f90 new file mode 100644 index 0000000..dc8645f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/arithmetic_if.f90 @@ -0,0 +1,31 @@ +! { dg-do run } +! { dg-options "-w" } +! Test program for PR 28439 +integer function myfunc(i) + integer i + integer, save :: value = 2 + value = value - 1 + 0 * i + myfunc = value +end function myfunc + +program pr28439 + + integer myfunc + + if (myfunc(0)) 10, 20, 30 ! Should go to 10 +10 call abort +20 call abort + +30 if (myfunc(0)) 40, 50, 60 ! Should go to 20 +40 call abort +60 call abort + +50 if (myfunc(0)) 70, 80, 90 ! Should go to 30 +80 call abort +90 call abort + +70 continue + +end program pr28439 + + |