[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-15 Thread spop at gcc dot gnu dot org


--- Comment #26 from spop at gcc dot gnu dot org  2009-08-15 06:47 ---
Subject: Bug 40981

Author: spop
Date: Sat Aug 15 06:46:59 2009
New Revision: 150787

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=150787
Log:
Correct the use of ppl_Pointset_Powerset_C_Polyhedron_maximize.

2009-08-15  Sebastian Pop  sebastian@amd.com

PR middle-end/40981
* graphite-ppl.c (ppl_max_for_le): Correct the use of
ppl_Pointset_Powerset_C_Polyhedron_maximize.

Modified:
branches/graphite/gcc/ChangeLog.graphite
branches/graphite/gcc/graphite-ppl.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-15 Thread spop at gcc dot gnu dot org


--- Comment #27 from spop at gcc dot gnu dot org  2009-08-15 07:10 ---
Subject: Bug 40981

Author: spop
Date: Sat Aug 15 07:10:20 2009
New Revision: 150789

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=150789
Log:
Correct the use of ppl_Pointset_Powerset_C_Polyhedron_maximize.

2009-08-15  Sebastian Pop  sebastian@amd.com

PR middle-end/40981
* graphite-interchange.c (ppl_max_for_le): Moved...
* graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
* graphite-ppl.c (ppl_max_for_le): ... here.  Correct the use of
ppl_Pointset_Powerset_C_Polyhedron_maximize.
* graphite-ppl.h (ppl_max_for_le): Declared.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/ChangeLog.graphite
trunk/gcc/graphite-interchange.c
trunk/gcc/graphite-poly.c
trunk/gcc/graphite-ppl.c
trunk/gcc/graphite-ppl.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-15 Thread howarth at nitro dot med dot uc dot edu


--- Comment #28 from howarth at nitro dot med dot uc dot edu  2009-08-15 
16:44 ---
Fixed on x86_64-apple-darwin10 with current gcc trunk. Thanks.


-- 

howarth at nitro dot med dot uc dot edu changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981




[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-14 Thread sebpop at gmail dot com


--- Comment #21 from sebpop at gmail dot com  2009-08-14 17:16 ---
Subject: Re:  aermod.f90 ICEs on -O2 -fgraphite-identity 
-floop-strip-mine

 Actually the error in gdb has changed with 1677_max.diff...


As expected: see the gcc_assert in the patch

+/* Return in RES the maximum of the linear expression LE on polyhedron PS.  */
+
+void
+ppl_max_for_le (ppl_Pointset_Powerset_C_Polyhedron_t ps,
+   ppl_Linear_Expression_t le, Value res)
+{
+  ppl_Coefficient_t num, denom;
+  Value dv, nv;
+  int maximum;
+
+  value_init (nv);
+  value_init (dv);
+  ppl_new_Coefficient (num);
+  ppl_new_Coefficient (denom);
+  ppl_Pointset_Powerset_C_Polyhedron_maximize (ps, le, num, denom, maximum);
+
+  if (maximum)
+{
+  ppl_Coefficient_to_mpz_t (num, nv);
+  ppl_Coefficient_to_mpz_t (denom, dv);
+  gcc_assert (value_notzero_p (dv));
+  value_division (res, nv, dv);
+}
+
+  value_clear (nv);
+  value_clear (dv);
+  ppl_delete_Coefficient (num);
+  ppl_delete_Coefficient (denom);
+}

What worries me is that PPL finds a maximum, but that is not a valid
max, as the denominator is zero.  Roberto, could you please look at
the bug http://gcc.gnu.org/PR40981 ?

Thanks,
Sebastian

 Program exited with code 04.
 (gdb) bt
 No stack.

 so I am no longer able to get a back trace.

That's because you do not load the gdbinit.in from the gcc dir, where
you have the following breakpoints:

# Put breakpoints at exit and fancy_abort in case abort is mapped
# to either fprintf/exit or fancy_abort.
b fancy_abort

# Put a breakpoint on internal_error to help with debugging ICEs.
b internal_error


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-14 Thread bagnara at cs dot unipr dot it


--- Comment #23 from bagnara at cs dot unipr dot it  2009-08-14 22:49 
---
What you can do is to use ppl_Linear_Expression_OK() and
ppl_Pointset_Powerset_C_Polyhedron_OK() to make sure you are not working with
corrupted objects.

If both the *_OK() functions evaluate to true, you could use the functions
ppl_Linear_Expression_ascii_dump() and
ppl_Pointset_Powerset_C_Polyhedron_ascii_dump() and attach the resulting output
here: this should allow us to reproduce the problem.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-14 Thread howarth at nitro dot med dot uc dot edu


--- Comment #24 from howarth at nitro dot med dot uc dot edu  2009-08-15 
00:02 ---
With 1677_max applied to r150727 and with the patch...

--- ../../gcc-4.5-20090813/gcc/graphite-ppl.c.org   2009-08-14
19:37:03.0 -0400
+++ ../../gcc-4.5-20090813/gcc/graphite-ppl.c   2009-08-14 19:58:56.0
-0400
@@ -623,7 +623,13 @@
   ppl_Coefficient_t num, denom;
   Value dv, nv;
   int maximum;
-
+ 
+  if (ppl_Linear_Expression_OK(le)) { 
+  if (ppl_Pointset_Powerset_C_Polyhedron_OK(ps)) {
+ ppl_Linear_Expression_ascii_dump(le,stdout);
+ ppl_Pointset_Powerset_C_Polyhedron_ascii_dump(ps,stdout);
+}
+  }
   value_init (nv);
   value_init (dv);
   ppl_new_Coefficient (num);

applied, I get the following for the aermod.f90 benchmark...

./gfortran -O2 -fgraphite-identity -floop-strip-mine
/Users/howarth/Downloads/pb05/lin/source/aermod.f90 -o
/Users/howarth/Downloads/pb05/lin/source/aermod
size 12 0 1 0 0 0 0 0 0 0 0 0 0 f -RPI_V -RPI  -NNC_V -NNC
size 1
space_dim 11
space_dim 11
-ZE -EM  +CM +GM  +CS +GS  -CP -GP  -SC +SG 
con_sys (up-to-date)
topology NECESSARILY_CLOSED
3 x 12 (sorted)
index_first_pending 3
-1 -1 1 0 0 0 0 0 0 0 0 0 =
1 0 0 0 0 0 0 0 0 0 0 0 =
0 1 0 0 0 0 0 0 0 0 0 0 =

gen_sys (up-to-date)
topology NECESSARILY_CLOSED
12 x 12 (not_sorted)
index_first_pending 12
0 0 0 0 0 0 0 0 0 0 0 1 L
0 0 0 0 0 0 0 0 0 0 1 0 L
0 0 0 0 0 0 0 0 0 1 0 0 L
0 0 0 1 0 0 0 0 0 0 0 0 L
0 0 0 0 1 0 0 0 0 0 0 0 L
0 0 0 0 0 1 0 0 0 0 0 0 L
0 0 0 0 0 0 1 0 0 0 0 0 L
0 0 0 0 0 0 0 1 0 0 0 0 L
0 0 0 0 0 0 0 0 1 0 0 0 L
0 1 1 0 0 0 0 0 0 0 0 0 R
1 0 1 0 0 0 0 0 0 0 0 0 P
0 0 1 0 0 0 0 0 0 0 0 0 R

sat_c
0 x 0

sat_g
3 x 12
0 0 0 0 0 0 0 0 0 0 0 1 
0 0 0 0 0 0 0 0 0 0 1 0 
0 0 0 0 0 0 0 0 0 1 0 0 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-14 Thread zaffanella at cs dot unipr dot it


--- Comment #25 from zaffanella at cs dot unipr dot it  2009-08-15 05:48 
---
Subject: Re: [PPL-devel]  aermod.f90 ICEs on -O2-fgraphite-identity
 -floop-strip-mine

Sebastian Pop wrote:
 Actually the error in gdb has changed with 1677_max.diff...

 
 As expected: see the gcc_assert in the patch
 
 +/* Return in RES the maximum of the linear expression LE on polyhedron PS.  
 */
 +
 +void
 +ppl_max_for_le (ppl_Pointset_Powerset_C_Polyhedron_t ps,
 + ppl_Linear_Expression_t le, Value res)
 +{
 +  ppl_Coefficient_t num, denom;
 +  Value dv, nv;
 +  int maximum;
 +
 +  value_init (nv);
 +  value_init (dv);
 +  ppl_new_Coefficient (num);
 +  ppl_new_Coefficient (denom);
 +  ppl_Pointset_Powerset_C_Polyhedron_maximize (ps, le, num, denom, maximum);
 +
 +  if (maximum)

[...]

 What worries me is that PPL finds a maximum, but that is not a valid
 max, as the denominator is zero.  Roberto, could you please look at
 the bug http://gcc.gnu.org/PR40981 ?
 
 Thanks,
 Sebastian

Hello, Sebastian.

It seems you have misunderstood the behavior of this function, which is 
meant to be similar to the corresponding function defined on simple 
(i.e., not powerset) polyhedra, whose documentation can be found here:

http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10.2-html/interfaceppl__Polyhedron__tag.html#93cee014592562084126f06fe47efbba


int ppl_Polyhedron_maximize_with_point
(ppl_const_Polyhedron_t ph, ppl_const_Linear_Expression_t le,
  ppl_Coefficient_t sup_n, ppl_Coefficient_t sup_d, int *pmaximum,
  ppl_Generator_t point)
Returns a positive integer if ph is not empty and le is bounded from 
above in ph, in which case the supremum value and a point where le 
reaches it are computed.


So, in order to see if there is maximization succeeded, you should check 
the return value of the function call, not the value of variable 
`maximum' (the latter is meant to distinguish between supremum/maximum 
in NNC computations).

Now, in the dump of the example provided by Howarth, it can be seen that 
we are trying to maximize the first dimension (let us call it A) of a 
11-dimensions polyhedron defined by constraints:

   A = 0, A = B - 1

Since the polyhedron is unbounded from above in dimension A, the 
function should return 0 and leave num, den, maximum untouched (this is 
why the denominator is zero).


Anyway, I think that your problem has pointed our attention to what 
seems to be a (unrelated) bug in the current implementation, whereby in 
powerset computations only we are wrongly returning a positive integer 
even when the powerset happens to be empty.

Cheers,
Enea Zaffanella.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-13 Thread howarth at nitro dot med dot uc dot edu


--- Comment #12 from howarth at nitro dot med dot uc dot edu  2009-08-13 
15:05 ---
Sebastian,
   Is there any other debug information, I can get for you to help pin this bug
down?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-13 Thread spop at gcc dot gnu dot org


--- Comment #13 from spop at gcc dot gnu dot org  2009-08-13 15:28 ---
Subject: Re:  aermod.f90 ICEs on -O2 -fgraphite-identity 
-floop-strip-mine

Could you try this patch on top of trunk?
If this fails with the gcc_assert, then probably the bug is in PPL.

Sebastian


--- Comment #14 from spop at gcc dot gnu dot org  2009-08-13 15:28 ---
Created an attachment (id=18354)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18354action=view)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-13 Thread dominiq at lps dot ens dot fr


--- Comment #15 from dominiq at lps dot ens dot fr  2009-08-13 15:30 ---
On *-apple-darwin9 (revision 150716) I do not see the ICEs:

[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
ac.f90
7.181u 0.151s 0:07.53 97.3% 0+0k 0+12io 3pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
aermod.f90
130.702u 3.544s 2:14.83 99.5%   0+0k 0+34io 12pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
air.f90
12.748u 0.251s 0:13.25 98.0%0+0k 0+13io 3pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
capacita.f90
2.426u 0.081s 0:02.65 94.3% 0+0k 2+4io 19pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
channel.f90
2.798u 0.086s 0:02.94 97.6% 0+0k 0+9io 0pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
doduc.f90
8.552u 0.258s 0:08.92 98.6% 0+0k 0+13io 3pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
fatigue.f90
7.047u 0.187s 0:07.40 97.5% 0+0k 3+22io 3pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
gas_dyn.f90
3.010u 0.121s 0:03.24 96.6% 0+0k 0+4io 7pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
induct.f90
99.419u 0.880s 1:40.68 99.6%0+0k 0+21io 1pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
linpk.f90
37.233u 0.295s 0:37.87 99.0%0+0k 0+6io 0pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
mdbx.f90
2.870u 0.109s 0:03.01 98.6% 0+0k 0+9io 0pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
nf.f90
3.999u 0.086s 0:04.11 99.0% 0+0k 0+2io 0pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
protein.f90
5.646u 0.264s 0:06.11 96.5% 0+0k 2+23io 2pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
rnflow.f90
9.138u 0.196s 0:09.71 95.9% 0+0k 0+11io 1pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
test_fpu.f90
7.993u 0.152s 0:08.26 98.5% 0+0k 1+18io 1pf+0w
[ibook-dhum] lin/test% time gfc -O2 -fgraphite-identity -floop-strip-mine
tfft.f90
2.821u 0.057s 0:02.94 97.6% 0+0k 0+1io 1pf+0w

[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
ac.f90
7.180u 0.152s 0:07.49 97.8% 0+0k 0+0io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
aermod.f90
141.691u 4.258s 2:28.96 97.9%   0+0k 0+40io 10pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
air.f90
9.735u 0.259s 0:10.52 94.8% 0+0k 0+15io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
capacita.f90
2.429u 0.085s 0:02.77 90.2% 0+0k 1+10io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
channel.f90
2.747u 0.086s 0:02.87 98.2% 0+0k 0+15io 1pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
doduc.f90
8.166u 0.318s 0:09.47 89.4% 0+0k 0+17io 1pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
fatigue.f90
6.978u 0.183s 0:07.83 91.3% 0+0k 0+13io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
gas_dyn.f90
3.008u 0.119s 0:03.15 98.7% 0+0k 0+17io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
induct.f90
29.788u 0.471s 0:30.57 98.9%0+0k 0+20io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
linpk.f90
31.518u 0.200s 0:32.15 98.6%0+0k 0+11io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
mdbx.f90
2.746u 0.110s 0:02.95 96.6% 0+0k 0+11io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
nf.f90
4.237u 0.084s 0:04.41 97.7% 0+0k 0+0io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
protein.f90
5.807u 0.251s 0:06.13 98.6% 0+0k 0+16io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
rnflow.f90
9.182u 0.190s 0:09.85 95.1% 0+0k 0+14io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
test_fpu.f90
8.251u 0.167s 0:08.48 99.1% 0+0k 0+13io 0pf+0w
[ibook-dhum] lin/test% time gfc -m64 -O2 -fgraphite-identity -floop-strip-mine
tfft.f90
2.834u 0.062s 0:02.92 98.9% 0+0k 0+19io 0pf+0w

Note that I used the following config:

Configured with: ../gcc-4.5-work/configure --prefix=/opt/gcc/gcc4.5w
--mandir=/opt/gcc/gcc4.5w/share/man --infodir=/opt/gcc/gcc4.5w/share/info
--build=i686-apple-darwin9 --enable-languages=c,c++,fortran,objc,obj-c++,java
--with-gmp=/sw --with-libiconv-prefix=/usr --with-system-zlib
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --with-cloog=/sw
--with-ppl=/sw --with-mpc=/opt/mpc/build



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-13 Thread howarth at nitro dot med dot uc dot edu


--- Comment #16 from howarth at nitro dot med dot uc dot edu  2009-08-13 
16:55 ---
Dominique,
 Could you try a build for x86_64-apple-darwin9? I would expect there could
be a big difference in the bugs tickled since the compiler is 64-bit code in
that case.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-13 Thread dominiq at lps dot ens dot fr


--- Comment #17 from dominiq at lps dot ens dot fr  2009-08-13 17:10 ---
 Dominique,
  Could you try a build for x86_64-apple-darwin9? I would expect there 
 could
 be a big difference in the bugs tickled since the compiler is 64-bit code in
 that case.

I have tried once in the pats but failed due to the following problem:

ld warning: in /sw/lib/libcloog.dylib, file is not of required architecture
ld warning: in /sw/lib/libppl_c.dylib, file is not of required architecture
ld warning: in /sw/lib/libppl.dylib, file is not of required architecture
ld warning: in /sw/lib/libgmpxx.dylib, file is not of required architecture
ld warning: in /sw/lib/libmpfr.dylib, file is not of required architecture
ld warning: in /sw/lib/libgmp.dylib, file is not of required architecture

and I did not find how to link with the 64 bit libs.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-13 Thread howarth at nitro dot med dot uc dot edu


--- Comment #18 from howarth at nitro dot med dot uc dot edu  2009-08-13 
23:29 ---
Current gcc trunk with 1677_max.diff applied still shows the bug. I'll run the
complete make check on ppl 0.10.2 for x86_64-apple-darwin tonight to make sure
the issue isn't revealed in the ppl testsuite.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-13 Thread howarth at nitro dot med dot uc dot edu


--- Comment #19 from howarth at nitro dot med dot uc dot edu  2009-08-14 
01:45 ---
Actually the error in gdb has changed with 1677_max.diff...

(gdb) r  -O2 -fgraphite-identity -floop-strip-mine air.f90 -o air
Starting program:
/sw/src/fink.build/gcc45-4.4.999-20090813/darwin_objdir/gcc/f951 -O2
-fgraphite-identity -floop-strip-mine air.f90 -o air
Reading symbols for shared libraries .++.. done
 MAIN__ main state spectop bound points fvspltx2 fvsplty2 derivx derivy xx
grid6 inlet aexit botwall topwall
Analyzing compilation unit
 {GC 6638k - 4188k}Performing interprocedural optimizations
 visibility early_local_cleanups {GC 5842k - 5718k} {GC 7502k - 6028k}
summary generate cp inline static-var pure-constAssembling functions:
 MAIN__ {GC 7858k - 6199k} {GC 8281k - 6211k} {GC 12794k - 7064k} {GC 9743k
- 8201k} {GC 11386k - 8305k} main state
air.f90: In function ‘state’:
air.f90:1034:0: internal compiler error: in ppl_max_for_le, at
graphite-ppl.c:637
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

Program exited with code 04.
(gdb) bt
No stack.

so I am no longer able to get a back trace.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-13 Thread howarth at nitro dot med dot uc dot edu


--- Comment #20 from howarth at nitro dot med dot uc dot edu  2009-08-14 
04:29 ---
Both gmp 4.3.1 and ppl 0.10.2 pass all of their testsuites on
x86_64-apple-darwin10. I'll also try to find the smallest code fragment which
will trigger this bug.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-12 Thread spop at gcc dot gnu dot org


--- Comment #1 from spop at gcc dot gnu dot org  2009-08-12 14:46 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-12 Thread howarth at nitro dot med dot uc dot edu


--- Comment #2 from howarth at nitro dot med dot uc dot edu  2009-08-12 
23:40 ---
What revision fixed this on trunk? I am still seeing the ICE with r150709 on
x86_64-apple-darwin10.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-12 Thread spop at gcc dot gnu dot org


--- Comment #3 from spop at gcc dot gnu dot org  2009-08-13 00:14 ---
On amd64-linux at r150694, I have all the polyhedron bmks compiling fine.
I double checked for aermod.f90 with exactly the same options where you see the
error:
gfortran -O2 -fgraphite-identity -floop-strip-mine aermod.f90 -o aermo


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-12 Thread howarth at nitro dot med dot uc dot edu


--- Comment #4 from howarth at nitro dot med dot uc dot edu  2009-08-13 
00:43 ---
I am actually seeing this problem with the aermod, air, capacita, doduc,
fatigue, gas_dyn, induct, linpk, mdbx, nf, protein, rnflow, test_fpu and tfft
benchmarks with...

-O2 -fgraphite-identity -floop-strip-mine

The ICEs are...

tfft.f90: In function ‘tfft’:
tfft.f90:3:0: internal compiler error: Floating point exception

rnflow.f90: In function ‘invima’:
rnflow.f90:2878:0: internal compiler error: Floating point exception

test_fpu.f90: In function ‘gauss’:
test_fpu.f90:89:0: internal compiler error: Floating point exception

protein.f90: In function ‘superficie_proteina’:
protein.f90:1585:0: internal compiler error: Floating point exception

nf.f90: In function ‘trisolve’:
nf.f90:227:0: internal compiler error: Floating point exception

mdbx.f90: In function ‘cbuild’:
mdbx.f90:1425:0: internal compiler error: Floating point exception

linpk.f90: In function ‘matgen’:
linpk.f90:44:0: internal compiler error: Floating point exception

induct.f90: In function ‘mutual_ind_cir_cir_coils’:
induct.f90:777:0: internal compiler error: Floating point exception

gas_dyn.f90: In function ‘cortesa’:
gas_dyn.f90:1791:0: internal compiler error: Floating point exception

fatigue.f90: In function ‘iztaccihuatl’:
fatigue.f90:1265:0: internal compiler error: Floating point exception

doduc.f90: In function ‘s00017’:
doduc.f90:1480:0: internal compiler error: Floating point exception

capacita.f90: In function ‘capacitance’:
capacita.f90:573:0: internal compiler error: Floating point exception

air.f90: In function ‘state’:
air.f90:1034:0: internal compiler error: Floating point exception

aermod.f90: In function ‘chk_endyr’:
aermod.f90:5620:0: internal compiler error: Floating point exception

In case it helps reproduce the problem on x86_64 linux, on
x86_64-apple-darwin10...

touch t.f90
gfortran -fverbose-asm t.f90 -S
more t.s
# GNU Fortran (GCC) version 4.5.0 20090812 (experimental)
(x86_64-apple-darwin10)
#   compiled by GNU C version 4.5.0 20090812 (experimental), GMP version
4.3.1, MPFR version 2.4.1
# GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
# options passed:  t.f90 -fPIC -mmacosx-version-min=10.6.0 -mtune=generic
# -fverbose-asm -fintrinsic-modules-path
# /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10/4.5.0/finclude
# options enabled:  -fPIC -falign-loops -fargument-noalias-anything
# -fasynchronous-unwind-tables -fauto-inc-dec -fbranch-count-reg -fcommon
# -fdelete-null-pointer-checks -fearly-inlining
# -feliminate-unused-debug-types -ffunction-cse -fgcse-lm -fident
# -finline-functions-called-once -fira-share-save-slots
# -fira-share-spill-slots -fivopts -fkeep-static-consts
# -fleading-underscore -fmerge-debug-strings -fmove-loop-invariants
# -fpeephole -freg-struct-return -fsched-critical-path-heuristic
# -fsched-dep-count-heuristic -fsched-group-heuristic -fsched-interblock
# -fsched-last-insn-heuristic -fsched-rank-heuristic
# -fsched-reg-pressure-heuristic -fsched-spec -fsched-spec-insn-heuristic
# -fsched-stalled-insns-dep -fshow-column -fsigned-zeros
# -fsplit-ivs-in-unroller -ftrapping-math -ftree-cselim -ftree-forwprop
# -ftree-loop-im -ftree-loop-ivcanon -ftree-loop-optimize
# -ftree-parallelize-loops= -ftree-phiprop -ftree-pta -ftree-reassoc
# -ftree-scev-cprop -ftree-slp-vectorize -ftree-switch-conversion
# -ftree-vect-loop-version -funit-at-a-time -funwind-tables
# -fvect-cost-model -fverbose-asm -fzero-initialized-in-bss
# -m128bit-long-double -m64 -m80387 -maccumulate-outgoing-args
# -malign-stringops -mfancy-math-387 -mfp-ret-in-387 -mfused-madd -mieee-fp
# -mmmx -mno-sse4 -mpush-args -mred-zone -msse -msse2 -msse3

.subsections_via_symbols


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-12 Thread howarth at nitro dot med dot uc dot edu


--- Comment #5 from howarth at nitro dot med dot uc dot edu  2009-08-13 
01:15 ---
These ICEs also occur with...

-O1 -fgraphite-identity -floop-strip-mine

but not...

-O0 -fgraphite-identity -floop-strip-mine


-- 

howarth at nitro dot med dot uc dot edu changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-12 Thread spop at gcc dot gnu dot org


--- Comment #6 from spop at gcc dot gnu dot org  2009-08-13 01:36 ---
Could you please run gdb on f951 and then report a backtrace of where it fails?

Thanks,
Sebastian


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-12 Thread howarth at nitro dot med dot uc dot edu


--- Comment #7 from howarth at nitro dot med dot uc dot edu  2009-08-13 
01:49 ---

(gdb) r -O2 -fgraphite-identity -floop-strip-mine aermod.f90 -o aermod
Starting program: /sw/lib/gcc4.5/libexec/gcc/x86_64-apple-darwin10/4.5.0/f951
-O2 -fgraphite-identity -floop-strip-mine aermod.f90 -o aermod
Reading symbols for shared libraries .++.. done
 aermod main hrloop julian gregor hrqext o3ext errhdl terrst sumtbl msgwrt
pnpoly allsetup allresult datime filopn header dcdlat preset preinclud srcsiz
presoinc recsiz prereinc precart pregencar prexypnts prepolr prepoldst
pregenpol preradrng prebound set_window chk_endyr calc pcalc aercalc prmcalc
gamcalc centroid refl_ht psrdeb vcalc volcalc acalc ardist ocalc setsrc fluxes
heff prmheff pdis vdis adisy adisz aer_pchi prm_pchi aer_achi debout penfct
cplume prm_plume acplume gcubic ltopg vdp scavrat pdep pdepg deplete f2int
prm_pdep prm_pdepg prm_deplete prm_f2int qatr2 qg2d2 olm_calc pvmrm_calc
plume_vol reldisp emfact distf wakflg xydist fterm fyplm fypan meandr critds
pdf skcalc crcalc alcalc becalc aacalc bbcalc llcalc decay vrtsbl vrtsbn vrtcbl
pfract erfx sumval aver hivals nhigh hsetfg maxvalue msetfg maxfil postfl
toxxfl prtday rsdump evlini evalck evalfl cocard titles modopt avetim pollid
edecay runnot flagdf evntfl savefl initfl errfil debopt myear gddef gdseas
gvsubd gdland urbopt o3val o3fil no2eq ev_setup ev_setord ev_oucard oevent
evloop meread ev_metext ev_chkdat hqread ev_hrqext evcalc ev_sumval stodbl
averev ev_output prtsoc prtdet metdet ev_flush evcard evper evloc iblval metini
locate anyavg inpsum prtopt prtsrc prtrec chkrec prtmet rsinit resini mecard
surfil profil sfdata uadata ondata prbase staend dayrng wdrota wscats meopen
scimit metext set_metdata set_dates metchk chkdat cmpdat chkclm chkmsg metqa
metdat metsum pflcnv pflini ziaver gintrp urbcalc grdurban grdpturb metdeb
grdeps oucard outqa ouhigh oumxvl oudaly oumxfl oupost ouplot perpst perplt
outoxx ouseas ourank oueval perave shave hiper pstann pltann plotfl output
prtann prtnhi sprtht prtmax prtsum evefil mxevnt prtpm10 maxpm10 prtpm10sum
shout rankfl averts areain plumef pside xwidth pwidth zbrent pside2 hpsort
escape adjemi amfrac lwind pdepth ptfrac piteff pitemi ctheta qatr3 pside_tox
pside2_tox qg2 prime1 numpr1 numrise rate lump marching unlump zmet nummet
zstream position numgrad wake_drdx wake_ini wake_scales wake_dfsn wake_dfsn2
wake_turb wake_u wake_xa wake_xa2 wake_dim wake_sig wake_dbg wake_cav0 cav_src
wake_fqc frgauss erfdif erf erfc wake_xsig cavity_ht sigypr sigzpr szsfclpr
deltah prmdelh hsprim sblris cblprd cblprn cblpr3 recard reelun recart gencar
xypnts setcar repolr polorg poldst genpol radrng setpol terhgt hilhgt flghgt
discar dispol sbyval evcart setup lwrupr define getfld expath exkey setord
stonum sindex fsplit varini includ grdsv refsv refsvc refsvm ntrpsv xtrpsv
grdsw refsw refswc refswm ntrpsw xtrpsw sigy sigz bid szsfcl rmssig socard
srcqa soelun soloca soparm pparm vparm aparm apparm arvert acparm gencir oparm
dsbldg dsfill emvary effill emunit counit dpunit partdep inppdm inpphi inppdn
gasdep meth_2 sogrp asngrp setidg vdp1 hremis urbans no2rat olmgrp comptg
tginit grdptg refptg ntrptg xtrptg xtrpdn grdpt grdden tgcard terfil terloc
tgelun tgdata tgqa zinterp grdws refws unstu stblu ntrpws xtrpws grdwd refwd1
ntrpwd xtrpwd
Analyzing compilation unit
 {GC 39382k - 26129k} {GC 34004k - 29619k} {GC 38591k - 33458k} {GC 43523k
- 37575k} {GC 48894k - 42656k}Performing interprocedural optimizations
 visibility early_local_cleanups {GC 55526k - 50076k} {GC 65102k -
63107k} summary generate cp inline static-var pure-constAssembling
functions:
 aermod main hrloop julian gregor hrqext o3ext errhdl terrst sumtbl msgwrt
pnpoly allsetup {GC 82097k - 71012k} allresult datime filopn header dcdlat
preset preinclud srcsiz presoinc recsiz prereinc precart pregencar prexypnts
prepolr prepoldst pregenpol preradrng prebound set_window chk_endyr
Program received signal EXC_ARITHMETIC, Arithmetic exception.
0x00014164a15d in __gmp_exception ()
(gdb) bt
#0  0x00014164a15d in __gmp_exception ()
#1  0x00014164a17e in __gmp_divide_by_zero ()
#2  0x00014166121f in __gmpz_tdiv_q ()
#3  0x000100518f46 in pbb_number_of_iterations (pbb=0x1575618c0,
loop_depth=0, niter=0x7fff5fbfd3c0) at
../../gcc-4.5-20090812/gcc/graphite-poly.c:734
#4  0x0001005122ab in scop_do_strip_mine (scop=value temporarily
unavailable, due to optimizations) at
../../gcc-4.5-20090812/gcc/graphite-blocking.c:169
#5  0x000100517f08 in apply_poly_transforms (scop=0x15750ca30) at
../../gcc-4.5-20090812/gcc/graphite-poly.c:258
#6  0x000100511d43 in graphite_transform_loops () at
../../gcc-4.5-20090812/gcc/graphite.c:274
#7  0x00010077444a in graphite_transforms () at
../../gcc-4.5-20090812/gcc/tree-ssa-loop.c:300
#8  0x0001005c52a9 in execute_one_pass (pass=0x100bea580) at
../../gcc-4.5-20090812/gcc/passes.c:1291
#9  0x0001005c553d in execute_pass_list 

[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-12 Thread howarth at nitro dot med dot uc dot edu


--- Comment #8 from howarth at nitro dot med dot uc dot edu  2009-08-13 
02:03 ---
Another example is...

(gdb) r  -O2 -fgraphite-identity -floop-strip-mine air.f90 -o air
Starting program: /sw/lib/gcc4.5/libexec/gcc/x86_64-apple-darwin10/4.5.0/f951
-O2 -fgraphite-identity -floop-strip-mine air.f90 -o air
Reading symbols for shared libraries .++.. done
 MAIN__ main state spectop bound points fvspltx2 fvsplty2 derivx derivy xx
grid6 inlet aexit botwall topwall
Analyzing compilation unit
 {GC 6638k - 4188k}Performing interprocedural optimizations
 visibility early_local_cleanups {GC 5842k - 5718k} {GC 7502k - 6028k}
summary generate cp inline static-var pure-constAssembling functions:
 MAIN__ {GC 7858k - 6199k} {GC 8281k - 6211k} {GC 12794k - 7064k} {GC 9743k
- 8201k} {GC 11386k - 8305k} main state
Program received signal EXC_ARITHMETIC, Arithmetic exception.
0x00014164a15d in __gmp_exception ()
(gdb) bt
#0  0x00014164a15d in __gmp_exception ()
#1  0x00014164a17e in __gmp_divide_by_zero ()
#2  0x00014166121f in __gmpz_tdiv_q ()
#3  0x000100518f46 in pbb_number_of_iterations (pbb=0x14275e670,
loop_depth=0, niter=0x7fff5fbfd3d0) at
../../gcc-4.5-20090812/gcc/graphite-poly.c:734
#4  0x0001005122ab in scop_do_strip_mine (scop=value temporarily
unavailable, due to optimizations) at
../../gcc-4.5-20090812/gcc/graphite-blocking.c:169
#5  0x000100517f08 in apply_poly_transforms (scop=0x142756f80) at
../../gcc-4.5-20090812/gcc/graphite-poly.c:258
#6  0x000100511d43 in graphite_transform_loops () at
../../gcc-4.5-20090812/gcc/graphite.c:274
#7  0x00010077444a in graphite_transforms () at
../../gcc-4.5-20090812/gcc/tree-ssa-loop.c:300
#8  0x0001005c52a9 in execute_one_pass (pass=0x100bea580) at
../../gcc-4.5-20090812/gcc/passes.c:1291
#9  0x0001005c553d in execute_pass_list (pass=0x100bea580) at
../../gcc-4.5-20090812/gcc/passes.c:1340
#10 0x0001005c554f in execute_pass_list (pass=0x100bea2e0) at
../../gcc-4.5-20090812/gcc/passes.c:1341
#11 0x0001005c554f in execute_pass_list (pass=0x100be9980) at
../../gcc-4.5-20090812/gcc/passes.c:1341
#12 0x0001006eec6f in tree_rest_of_compilation (fndecl=0x14297c100) at
../../gcc-4.5-20090812/gcc/tree-optimize.c:390
#13 0x00010088b4ad in cgraph_expand_function (node=0x14297c300) at
../../gcc-4.5-20090812/gcc/cgraphunit.c:1114
#14 0x00010088d60a in cgraph_expand_all_functions [inlined] () at
/sw/src/fink.build/gcc45-4.4.999-20090812/gcc-4.5-20090812/gcc/cgraphunit.c:1173
#15 0x00010088d60a in cgraph_finalize_compilation_unit () at
../../gcc-4.5-20090812/gcc/cgraphunit.c:1396
#16 0x0001005714d6 in write_global_declarations () at
../../gcc-4.5-20090812/gcc/langhooks.c:314
#17 0x000100687d80 in compile_file [inlined] () at
/sw/src/fink.build/gcc45-4.4.999-20090812/gcc-4.5-20090812/gcc/toplev.c:1038
#18 0x000100687d80 in toplev_main (argc=7, argv=0x7fff5fbfd770) at
../../gcc-4.5-20090812/gcc/toplev.c:2351
#19 0x00010a34 in start ()

FYI, gcc trunk is built against gmp 4.3.1 and mpfr 2.4.1 in case it matters.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-12 Thread spop at gcc dot gnu dot org


--- Comment #9 from spop at gcc dot gnu dot org  2009-08-13 02:37 ---
Subject: Re:  aermod.f90 ICEs on -O2 -fgraphite-identity 
-floop-strip-mine

Could you please try the attached patch?

Thanks,
Sebastian


--- Comment #10 from spop at gcc dot gnu dot org  2009-08-13 02:37 ---
Created an attachment (id=18347)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18347action=view)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-12 Thread howarth at nitro dot med dot uc dot edu


--- Comment #11 from howarth at nitro dot med dot uc dot edu  2009-08-13 
03:28 ---
Still crashes with proposed patch...

(gdb) r  -O2 -fgraphite-identity -floop-strip-mine air.f90 -o air
Starting program: /sw/lib/gcc4.5/libexec/gcc/x86_64-apple-darwin10/4.5.0/f951
-O2 -fgraphite-identity -floop-strip-mine air.f90 -o air
Reading symbols for shared libraries .++.. done
 MAIN__ main state spectop bound points fvspltx2 fvsplty2 derivx derivy xx
grid6 inlet aexit botwall topwall
Analyzing compilation unit
 {GC 6638k - 4188k}Performing interprocedural optimizations
 visibility early_local_cleanups {GC 5842k - 5718k} {GC 7502k - 6028k}
summary generate cp inline static-var pure-constAssembling functions:
 MAIN__ {GC 7858k - 6199k} {GC 8281k - 6211k} {GC 12794k - 7064k} {GC 9743k
- 8201k} {GC 11386k - 8305k} main state
Program received signal EXC_ARITHMETIC, Arithmetic exception.
0x00014164a15d in __gmp_exception ()
(gdb) bt
#0  0x00014164a15d in __gmp_exception ()
#1  0x00014164a17e in __gmp_divide_by_zero ()
#2  0x00014166121f in __gmpz_tdiv_q ()
#3  0x000100518f46 in pbb_number_of_iterations (pbb=0x14275e670,
loop_depth=0, niter=0x7fff5fbfd3d0) at
../../gcc-4.5-20090812/gcc/graphite-poly.c:734
#4  0x0001005122ab in scop_do_strip_mine (scop=value temporarily
unavailable, due to optimizations) at
../../gcc-4.5-20090812/gcc/graphite-blocking.c:169
#5  0x000100517f08 in apply_poly_transforms (scop=0x142756f80) at
../../gcc-4.5-20090812/gcc/graphite-poly.c:258
#6  0x000100511d43 in graphite_transform_loops () at
../../gcc-4.5-20090812/gcc/graphite.c:274
#7  0x00010077444a in graphite_transforms () at
../../gcc-4.5-20090812/gcc/tree-ssa-loop.c:300
#8  0x0001005c52a9 in execute_one_pass (pass=0x100bea580) at
../../gcc-4.5-20090812/gcc/passes.c:1291
#9  0x0001005c553d in execute_pass_list (pass=0x100bea580) at
../../gcc-4.5-20090812/gcc/passes.c:1340
#10 0x0001005c554f in execute_pass_list (pass=0x100bea2e0) at
../../gcc-4.5-20090812/gcc/passes.c:1341
#11 0x0001005c554f in execute_pass_list (pass=0x100be9980) at
../../gcc-4.5-20090812/gcc/passes.c:1341
#12 0x0001006eec6f in tree_rest_of_compilation (fndecl=0x14297c100) at
../../gcc-4.5-20090812/gcc/tree-optimize.c:390
#13 0x00010088b4ad in cgraph_expand_function (node=0x14297c300) at
../../gcc-4.5-20090812/gcc/cgraphunit.c:1114
#14 0x00010088d60a in cgraph_expand_all_functions [inlined] () at
/sw/src/fink.build/gcc45-4.4.999-20090812/gcc-4.5-20090812/gcc/cgraphunit.c:1173
#15 0x00010088d60a in cgraph_finalize_compilation_unit () at
../../gcc-4.5-20090812/gcc/cgraphunit.c:1396
#16 0x0001005714d6 in write_global_declarations () at
../../gcc-4.5-20090812/gcc/langhooks.c:314
#17 0x000100687d80 in compile_file [inlined] () at
/sw/src/fink.build/gcc45-4.4.999-20090812/gcc-4.5-20090812/gcc/toplev.c:1038
#18 0x000100687d80 in toplev_main (argc=7, argv=0x7fff5fbfd770) at
../../gcc-4.5-20090812/gcc/toplev.c:2351
#19 0x00010a34 in start ()


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981



[Bug middle-end/40981] aermod.f90 ICEs on -O2 -fgraphite-identity -floop-strip-mine

2009-08-05 Thread spop at gcc dot gnu dot org


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-08-06 01:07:13
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40981