Need help creating a small test case for g++ 4.0.0 bug
Paul C. Leopardi
leopardi@bigpond.net.au
Sat May 14 06:28:00 GMT 2005
Hi all,
I originally posted these messages to gcc-help, but had no reply, so I am
re-posting links to them here.
I think I have found a bug in g++ 4.0.0, but need help in reporting it.
Maintainers like their bug reports to include short test cases, but I don't
know how to generate a short test case involving inlining. I discovered the
original problem by compiling GluCat ( http://glucat.sf.net ) and the
preprocessor output from a short GluCat test program contains over 66 000
lines of libstdc++, uBLAS and Glucat code.
Can anyone help, or should I just file a bug report using the huge test case?
The original posts were:
g++ 4.0.0: hash_map hangs when compiled with -O3 on AMD64
http://gcc.gnu.org/ml/gcc-help/2005-05/msg00030.html
Re: g++ 4.0.0: hash_map hangs when compiled with -O3 on AMD64
http://gcc.gnu.org/ml/gcc-help/2005-05/msg00087.html
I am particularly interested in the interference between hash_map,
-fstrict-aliasing and -finline-functions, and I wonder if it happens on
other architectures, or only on AMD64.
Best regards, Paul Leopardi
PS.
If you try compling the current GluCat 0.1.8 using g++ 4.0.0, you will need
the following patch.
diff
-u /home/leopardi/src/glucat/glucat-0.1.8/glucat/portability.h ./portability.h
--- /home/leopardi/src/glucat/glucat-0.1.8/glucat/portability.h 2004-05-10
21:28:42.000000000 +1000
+++ ./portability.h 2005-05-01 22:11:22.000000000 +1000
@@ -28,15 +28,15 @@
#define ios_base ios // scope is different for standard C++
#endif
-//***************************** workaround for ICC and G++ 3.3+
-#if defined (__ICL) || defined (__ICC) || defined (__GNUG__) && (__GNUC__ >=
3) && (__GNUC_MINOR__ >= 3)
+//***************************** workaround for ICC, G++ 3.3+, G++ 4.0+
+#if defined (__ICL) || defined (__ICC) || defined (__GNUG__) && ((__GNUC__ ==
3) && (__GNUC_MINOR__ >= 3) || (__GNUC__ == 4))
#define _GLUCAT_PRIVATE public
#else
#define _GLUCAT_PRIVATE private
#endif
//***************************** workaround for G++ 3.2 typename bug
-#if defined (__GNUG__) && (__GNUC__ >= 3) && (__GNUC_MINOR__ <= 2)
+#if defined (__GNUG__) && (__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)
#define _GLUCAT_USE_STRUCT_NAME(T)
#else
#define _GLUCAT_USE_STRUCT_NAME(T) T::
More information about the Gcc
mailing list