From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5394 invoked by alias); 3 Nov 2009 15:22:57 -0000 Received: (qmail 4642 invoked by uid 48); 3 Nov 2009 15:22:30 -0000 Date: Tue, 03 Nov 2009 15:22:00 -0000 Subject: [Bug middle-end/41924] New: graphite miscompiles aermod X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "lifeng at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg00178.txt.bz2 http://www.polyhedron.com/web_images/documents/pb05.zip the testers report this: aermod FAILED 1 fails and 5 passes [...] Finished Testing 16 benchmarks - 15 passed, and 1 failed ------------------------------------------------------ I have reduced the aermod problem in polyhedron benchmark. It seems that the cloog generate the wrong code for a simple case... -----------Reduced fortran code-------------------- MODULE MAIN1 REAL , ALLOCATABLE :: HRVALD(:) END MODULE MAIN1 SUBROUTINE VOLCALC() USE MAIN1 INTEGER :: ITYP LOGICAL :: WETSCIM DO ITYP = 1 , 100 IF ( WETSCIM ) HRVALD(ITYP) = 0.0 ENDDO END SUBROUTINE VOLCALC --------------------------------------------------------- Equivalent C code int hrval[101]; void volcalc() { int i; int wetscim; for (i = 0; i < 100; i++) if (wetscim) hrval[i] = 0; } -------------------------------------------------- (gdb) set debug_generated_program (scop) if (wetscim_3 <= -1) { for (scat_1=0;scat_1<=99;scat_1++) { S4(scat_1) ; } } if (wetscim_3 >= 1) { for (;;scat_1++) { for (git_0=0;git_0<=99;git_0++) { S4(git_0) ; } } } ---------------------------------------------------- (gdb) set debug_scop (scop) scop ( parameters ( p_0 -> wetscim_3(D) ) context ( # eq p0 cst 0 3 ) pbb_4 ( conditions bb_4 (if (wetscim_3(D) != 0) ) cases bb_4 (if (wetscim_3(D) != 0) ) pdr_0 (write (Data Ref: stmt: hrval[i_11] = 0; ref: hrval[i_11]; base_object: hrval[0]; Access function 0: {0, +, 1}_1 ) data accesses ( # eq i0 p0 alias sub0 cst 4 6 0 1 0 0 -1 0 0 0 0 1 0 -1 1 -1 0 0 0 100 1 1 0 0 0 0 ) ) domains bb_4 ( # eq i0 p0 cst 3 4 1 -1 0 99 1 1 0 0 1 0 -1 -1 3 4 1 -1 0 99 1 1 0 0 1 0 1 -1 ) scattering bb_4 ( # eq s0 s1 s2 i0 p0 cst 3 7 0 1 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 1 0 0 0 ) ) original_lst ( (root 0 (loop 0 stmt_4))) transformed_lst ( (root 0 (loop 0 stmt_4))) ) -- Summary: graphite miscompiles aermod Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: lifeng at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41924