[tuples] GCC 3.4.x as bootstrap compiler OOMs on tree-data-ref.c

Jakub Jelinek jakub@redhat.com
Sat Jul 12 10:19:00 GMT 2008


Hi!

Apparently it is already GCC 3.4.x bootstrap compiler that
OOMs during stage1, something that wasn't clear last night.
It chokes on
gimple stmt = CONST_CAST_GIMPLE ((const_gimple) s);
in ref_base_address_1, which was changed because of the
unfortunate C++ compatibility warnings from
@@ -5006,7 +5008,7 @@ have_similar_memory_accesses_1 (const vo
 static hashval_t
 ref_base_address_1 (const void *s)
 {
-  gimple stmt = (gimple) s;
+  gimple stmt = CONST_CAST_GIMPLE ((const_gimple) s);
   unsigned i;
   VEC (data_ref_loc, heap) *refs;
   data_ref_loc *ref;

The bug on the 3.4.x side is PR17436 and it eats all the
memory due to ever growing the seen_types chain; I've tested
that PR17436 backport actually fixed it.  While that is
a 3.4.x bug, disallowing its use as bootstrap compiler just
because of that is bad, so I wonder if we shouldn't instead

--- gcc/system.h.jj	2008-07-02 11:38:49.000000000 +0200
+++ gcc/system.h	2008-07-12 10:38:47.000000000 +0200
@@ -786,8 +786,9 @@ extern void fancy_abort (const char *, i
    change after the fact).  Beyond these uses, most other cases of
    using this macro should be viewed with extreme caution.  */
 
-#if defined(__GNUC__) && GCC_VERSION != 4000
-/* GCC 4.0.x has a bug where it may ICE on this expression.  */
+#if defined(__GNUC__) && GCC_VERSION > 4000
+/* GCC 4.0.x has a bug where it may ICE on this expression,
+   so does GCC 3.4.x (PR17436).  */
 #define CONST_CAST2(TOTYPE,FROMTYPE,X) ((__extension__(union {FROMTYPE _q; TOTYPE _nq;})(X))._nq)
 #else
 #define CONST_CAST2(TOTYPE,FROMTYPE,X) ((TOTYPE)(FROMTYPE)(X))


	Jakub



More information about the Gcc-patches mailing list