Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/function_optimize_4.f90 @ 127:4c56639505ff
fix function.c and add CbC-example Makefile
author | mir3636 |
---|---|
date | Wed, 11 Apr 2018 18:46:58 +0900 |
parents | 04ced10e8804 |
children | 84e7813d76e9 |
line wrap: on
line source
! { dg-do run } ! { dg-options "-O" } ! PR 48412 - function elimination got temporary varibles in the wrong order. ! Test case contributed by Joost VandeVondele. INTEGER FUNCTION S1(m,ma,lx) INTEGER :: m,ma,lx IF (((m < 0).AND.(MODULO(ABS(ma-lx),2) == 1)).OR.& ((m > 0).AND.(MODULO(ABS(ma-lx),2) == 0))) THEN S1=1 ELSE S1=0 ENDIF END FUNCTION INTEGER :: s1 IF (S1(1,2,1).NE.0) CALL ABORT() END