This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/41924] New: graphite miscompiles aermod


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]