This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48412] [4.7 Regression] CP2K miscompiled due to some Fortran frontend pass
- From: "Joost.VandeVondele at pci dot uzh.ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 4 Apr 2011 10:51:55 +0000
- Subject: [Bug fortran/48412] [4.7 Regression] CP2K miscompiled due to some Fortran frontend pass
- Auto-submitted: auto-generated
- References: <bug-48412-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48412
--- Comment #4 from Joost VandeVondele <Joost.VandeVondele at pci dot uzh.ch> 2011-04-04 10:50:57 UTC ---
reduced testcase .... aborts at -O1, goes fine at -O0. Thanks for implementing
the warning, without this, it would have been very difficult to find.
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