GCC 3.2 Release Series
Changes, New Features, and Fixes
The latest release in the 3.2 release series is
GCC 3.2.3.
Caveats and New Features
Caveats
- The C++ compiler does not correctly zero-initialize
pointers-to-data members. You must explicitly initialize
them. For example:
int S::*m(0);
will work, but depending on default-initialization to zero
will not work. This bug cannot be fixed in GCC 3.2 without
inducing unacceptable risks. It will be fixed in GCC 3.3.
- This GCC release is based on the GCC 3.1 sourcebase, and thus has
all the changes in the GCC 3.1
series. In addition, GCC 3.2 has a number of C++ ABI fixes
which make its C++ compiler generate binary code which is incompatible
with the C++ compilers found in earlier GCC releases, including GCC 3.1
and GCC 3.1.1.
Frontend Enhancements
C/C++/Objective-C
- The method of constructing the list of directories to be searched
for header files has been revised. If a directory named by a
-I
option is a standard system include directory,
the option is ignored to ensure that the default search order
for system directories and the special treatment of system header
files are not defeated.
- The C and Objective-C compilers no longer accept the "Naming
Types" extension (
typedef foo = bar
); it was
already unavailable in C++. Code which uses it will need to
be changed to use the "typeof" extension instead:
typedef typeof(bar) foo
. (We have removed this
extension without a period of deprecation because it has
caused the compiler to crash since version 3.0 and no one
noticed until very recently. Thus we conclude it is not in
widespread use.)
C++
- There are now no known differences between the C++ ABI
implemented in GCC and the multi-vendor standard. We believe that
the ABI for the C++ standard library is now stable and will not
change in future versions of the compiler. However, hard
experience has taught us to be cautious; it is possible that more
problems will be found. It is our intention to make changes to
the ABI only if they are necessary for correct compilation of C++,
as opposed to conformance to the ABI documents.
- For details on how to build an ABI compliant compiler for
GNU/Linux systems, check the common C++ ABI
page.
New Targets and Target Specific Improvements
IA-32
- Fixed a number of bugs in SSE and MMX intrinsics.
- Fixed common compiler crashes with SSE instruction set enabled
(implied by
-march=pentium3
, pentium4
,
athlon-xp
)
__m128
and __m128i
is not 128bit
aligned when used in structures.
x86-64
- A bug whereby the compiler could generate bad code for
bzero
has been fixed.
- ABI fixes (implying ABI incompatibilities with previous version in some
corner cases)
- Fixed prefetch code generation
3.2.3 is a bug fix release only; there are no new features that
were not present in GCC 3.2.2.
Bug Fixes
This section lists the problem reports (PRs) from GCC's bug tracking
system (GNATS) that are known to be fixed in the 3.2.2 release. This
list might not be complete (that is, it is possible that some PRs
that have been fixed are not listed here).
The sorting is slightly different from the GNATS categories, and some of
the titles have been changed to make them more clear.
Internal Compiler Errors (multi-platform)
- 3782: (c++)
-quiet -fstats
produces a segmentation fault in cc1plus
- 6440: (c++) template specializations cause ICE
- 7050: (c++) ICE on:
(i ? get_string() : throw)
- 7741: ICE on conflicting types (
make_decl_rtl
in varasm.c
)
- 7982: (c++) ICE due to infinite recursion (using STL set)
- 8068: exceedingly high (infinite) memory usage
- 8178: ICE with
__builtin_ffs
- 8396: ICE in
copy_to_mode_reg
, in explow.c
- 8674: (c++) ICE in
cp_expr_size
, in cp/cp-lang.c
- 9768: ICE when optimizing inline code at
-O2
- 9798: (c++) Infinite recursion (segfault) in
cp/decl.c:push_using_directive
with recursive using
directives
- 9799: mismatching structure initializer with nested flexible array member: ICE
- 9928: ICE on duplicate
enum
declaration
- 10114: ICE in
mem_loc_descriptor
, in dwarf2out.c
(affects sparc, alpha)
- 10352: ICE in
find_reloads_toplev
- 10336: ICE with
-Wunreachable-code
C/optimizer bugs:
- 8224: Incorrect joining of signed and unsigned division
- 8613:
-O2
produces wrong code with builtin strlen
and postincrements
- 8828: gcc reports some code is unreachable when it is not
- 9226: GCSE breaking argument passing
- 9853: miscompilation of non-constant structure initializer
- 9797: C99-style
struct
initializers are miscompiled
- 9967: Some standard C function calls should not be replaced when optimizing for size
- 10116: ce2: invalid merge of
join_bb
in the context of switch
statements
- 10171: wrong code for inlined function
- 10175:
-Wunreachable-code
doesn't work for single lines
C++ compiler and library:
- 8316: Confusing diagnostic for code that misuses conversion operators
- 9169:
filebuf
output fails if codecvt<>::out
returns noconv
- 9420: incomplete type incorrectly reported
- 9459:
typeof
in return type specification of template not supported
- 9507:
filebuf::open
handles ios_base::ate
incorrectly
- 9538: Out-of-bounds memory access in
streambuf::sputbackc
- 9602: Total confusion about template/friend/virtual/abstract
- 9993: destructor not called for local object created within and returned from infinite loop
- 10167:
ieee_1003.1-2001
locale specialisations on a glibc-2.3.2 system
Java compiler and library:
- 9652: libgcj build fails on irix6.5.1[78]
- 10144: gas on solaris complains about bad
.stabs
lines for java, native as unaffected
x86-specific (Intel/AMD):
- 8746: gcc miscompiles Linux kernel ppa driver on x86
- 9888:
-mcpu=k6 -Os
produces out of range loop instructions
- 9638: Cross-build for target i386-elf and i586-pc-linux-gnu failed
- 9954: Cross-build for target i586-pc-linux-gnu (
--with-newlib
) failed
Sparc-specific:
- 7784: [Sparc] ICE in extract_insn, in recog.c
- 7796: sparc extra failure with
-m64
on execute/930921-1.c in unroll.c
- 8281: ICE when compiling with
-O2 -fPIC
for Ultrasparc
- 8366: [Sparc] C testsuite failure with
-m64
-fpic -O in execute/loop-2d.c
- 8726: gcc
-O2
miscompiles Samba 2.2.7 on 32-bit sparc
- 9414: Scheduling bug on Ultrasparc
- 10067: GCC-3.2.2 outputs invalid asm on sparc64
m68k-specific:
- 7248: broken "inclusive or" code
- 8343: m68k-elf/rtems ICE at instantiate_virtual_regs_1
PowerPC-specific:
- 9732: Wrong code with
-O2 -fPIC
- 10073: ICE: powerpc cannot split insn
Alpha-specific:
- 7702: optimization problem on a DEC alpha under OSF1
- 9671: gcc.3.2.2 does not build on a HP Tru64 Unix v5.1B system
HP-specific:
- 8694: <string> breaks <ctype.h> on HP-UX 10.20 (DUP: 9275)
- 9953: (ada) gcc 3.2.x can't build 3.3-branch ada on HP-UX 10 (missing symbol)
- 10271: Floating point args don't get reloaded across function calls with
-O2
MIPS specific:
- 6362: mips-irix6 gcc-3.1 C testsuite failure with
-mips4
in compile/920501-4.c
CRIS specific:
- 10377: gcc-3.2.2 creates bad assembler code for cris
Miscellaneous and minor bugs:
- 6955: collect2 says "core dumped" when there is no core
Beginning with 3.2.2, GCC's Makefile suite supports redirection of
make install
by means of the DESTDIR
variable. Parts of the GCC tree have featured that support long
before, but now it is available even from the top level.
Other than that, GCC 3.2.2 is a bug fix release only; there are no
new features that were not present in GCC 3.2.1.
Bug Fixes
On the following i386-based systems GCC 3.2.1 broke the C ABI wrt.
functions returning structures: Cygwin, FreeBSD (GCC 3.2.1 as shipped
with FreeBSD 5.0 does not have this problem), Interix, a.out-based Linux
and NetBSD, OpenBSD, and Darwin. GCC 3.2.2 reverts this ABI change, and
thus restores ABI-compatibility with previous releases (except GCC 3.2.1)
on these platforms.
This section lists the problem reports (PRs) from GCC's bug tracking
system (GNATS) that are known to be fixed in the 3.2.2 release. This
list might not be complete (that is, it is possible that some PRs
that have been fixed are not listed here).
The sorting is slightly different from the GNATS categories, and some of
the titles have been changed to make them more clear.
Internal Compiler Errors (multi-platform)
- 5919: (c++) ICE when passing variable array to template function
- 7129: (c++) ICE with min/max assignment operators (
<?=
and >?=
)
- 7507: ICE with
-O2
when address of called function is a complicated expression
- 7622: ICE with nested inline functions if function's address is taken
- 7681: (fortran) ICE in
compensate_edge
, in reg-stack.c
(also PR 9258)
- 8031: (c++) ICE in code comparing
typeid
s and casting from virtual base
- 8275: ICE in
simplify_subreg
- 8332: (c++) builtin
strlen
/template interaction causes ICE
- 8372: (c++) ICE on explicit call of destructor
- 8439: (c, not c++) empty struct causes ICE
- 8442: (c++) ICE with nested template classes
- 8518: ICE when compiling mplayer ("
extern inline
" issue)
- 8615: (c++) ICE with out-of-range character constant template argument
- 8663: (c++) ICE in
cp_expr_size
, at cp-lang.c:307
- 8799: (c++) ICE: error reporting routines re-entered
- 9328: (c++) ICE with
typeof(X)
for overloaded X
- 9465: (preprocessor)
cpp -traditional
ICE on null bytes
C++ (compiler and library) bugs
- 47: scoping in nested classes is broken
- 6745: problems with iostream rdbuf() member function
- 8214: conversion from
const char*
const to char*
sometimes accepted illegally
- 8493: builtin strlen and overload resolution (same bug as 8332)
- 8503: strange behaviour of function types
- 8727: compiler confused by inheritance from an anonymous struct
- 7445: poor performance of
std::locale::classic()
in multi-threaded applications
- 8230: mishandling of overflow in
vector<T>::resize
- 8399:
sync_with_stdio(false)
breaks unformatted input
- 8662: illegal access of private member of unnamed class is accepted
- 8707: "make distclean" fails in
libstdc++-v3
directory
- 8708:
__USE_MALLOC
doesn't work
- 8790: Use of non-thread-safe
strtok
in src/localename.cc
- 8887: Bug in date formats with
--enable-clocale=generic
- 9076: Call Frame Instructions are not handled correctly during unwind operation
- 9151:
std::setprecision
limited to 16 digits when outputting a double to a stream
- 9168:
codecvt<char, char, mbstate_t>
overwrites output buffers
- 9269: libstdc++ headers: explicit specialization of function must precede its first use
- 9322: return value of
basic_streambuf<>::getloc
affected by locale::global
- 9433: segfault in runtime support for
dynamic_cast
C and optimizer bugs
- 8032: GCC incorrectly initializes static structs that have flexible arrays
- 8639: simple arithmetic expression broken
- 8794: optimization improperly eliminates certain expressions
- 8832: traditional "
asm volatile
" code is illegally optimized
- 8988: loop optimizer bug: with
-O2
, code is generated that segfaults (found on i386, bug present for all platforms)
- 9492: structure copy clobbers subsequent stores to structure
Objective-C bugs
- 9267: Objective-C parser won't build with newer bison versions (e.g. 1.875)
Ada bugs
- 8344: Ada build problem due to conflict between
gcc/final.o
, gcc/ada/final.o
Preprocessor bugs
- 8524:
_Pragma
within macros is improperly expanded
- 8880:
__WCHAR_TYPE__
macro incorrectly set to "long int
" with -fshort-wchar
ARM-specific
- 9090: arm ICE with
>= -O2
; regression from gcc-2.95
x86-specific (Intel/AMD)
- 8588: ICE in
extract_insn
, at recog.c:NNNN
(shift instruction)
- 8599: loop unroll bug with
-march=k6-3
- 9506: ABI breakage in structure return (affects BSD and Cygwin, but not GNU/Linux)
FreeBSD 5.0 specific
- 9484: GCC 3.2.1 Bootstrap failure on FreeBSD 5.0
RTEMS-specific
- 9292: hppa1.1-rtems configurery problems
- 9293: [m68k-elf/rtems]
config/m68k/t-crtstuff
bug
- 9295: [mips-rtems]
config/mips/rtems.h
init
/fini
issue
- 9296: gthr-rtems regression
- 9316: powerpc-rtems: extending multilibs
HP-PA specific
- 9493: ICE with
-O2
when building a simple function
Documentation
- 7341: hyperlink to
gcov
in GCC documentation doesn't work
- 8947: Please add a warning about "
-malign-double
" in docs
- 7448, 8882: typo cleanups
3.2.1 adds a new warning, -Wabi
. This option warns when GNU
C++ generates code that is known not to be binary-compatible with the
vendor-neutral ia32/ia64 ABI. Please consult the GCC manual, included in the
distribution, for details.
This release also removes an old GCC extension, "naming types", and the
documentation now directs users to use a different GCC extension,
__typeof__
, instead. The feature had evidently been broken for a
while.
Otherwise, 3.2.1 is a bug fix release only; other than bug fixes and the
new warning there are no new features that were not present in GCC 3.2.
In addition, the previous fix for
PR 7445
(poor performance of std::locale::classic()
in multi-threaded
applications) was reverted ("unfixed"), because the "fix" was not
thread-safe.
Bug Fixes
This section lists the problem reports (PRs) from GCC's bug tracking
system (GNATS) that
are known to be fixed in the 3.2.1 release. This list might not be complete
(that is, it is possible that some PRs that have been fixed are not listed
here). As you can see, the number of bug fixes is quite large, so it is
strongly recommended that users of earlier gcc 3.x releases upgrade to
GCC 3.2.1.
Internal Compiler Errors (multi-platform)
- 2521: (c++) ICE in
build_ptrmemfunc
, in cp/typeck.c
- 5661: (c++) ICE instantiating template on array of unknown size (bad code)
- 6419: (c++) ICE in
make_decl_rtl
for "longest" attribute on 64-bit platforms
- 6994: (c++) ICE in
find_function_data
- 7150: preprocessor:
GCC -dM -E
gives an ICE
- 7160: ICE when optimizing branches without a return value
- 7228: (c++) ICE when using member template and template function
- 7266: (c++) ICE with
-pedantic
on missing typename
- 7353: ICE from use of "Naming Types" extension, see above
- 7411: ICE in
instantiate_virtual_regs_1
, in function.c
- 7478: (c++) ICE on
static_cast
inside template
- 7526: preprocessor core dump when
_Pragma
implies #pragma
dependency
- 7721: (c++) ICE on simple (but incorrect) template
(7803 is a duplicate)
- 7754: (c++) ICE on union with template parameter
- 7788: (c++) redeclaring a definition as an incomplete class causes ICE
- 8031: (c++) ICE in comptypes, in
cp/typeck.c
- 8055: preprocessor dies with SIG11 when building FreeBSD kernel
- 8067: (c++) ICE due to mishandling of
__FUNCTION__
and related variables
- 8134: (c++) ICE in
force_store_init_value
on legal code
- 8149: (c++) ICE on incomplete type
- 8160: (c++) ICE in
build_modify_expr
, in cp/typeck.c
: array initialization
C++ (compiler and library) bugs
- 5607: No pointer adjustment in covariant return types
- 6579: Infinite loop with statement expressions in member initialization
- 6803: Default copy constructor bug in GCC 3.1
- 7176: g++ confused by friend and static member with same name
- 7188: Segfault with template class and recursive (incorrect) initializer list
- 7306: Regression: GCC 3.x fails to compile code with virtual inheritance if a method has a variable number of arguments
- 7461:
ctype<char>::classic_table()
returns offset array on Cygwin
- 7524:
f(const float arg[3])
fails
- 7584: Erroneous ambiguous base error on using declaration
- 7676: Member template overloading problem
- 7679: infinite loop when a right parenthesis is missing
- 7811: default locale not taken from environment
- 7961:
compare( char *)
implemented incorrectly in basic_string<>
- 8071:
basic_ostream::operator<<(streambuf*)
loops forever if streambuf::underflow()
leaves gptr()
NULL (dups:
8127,
6745)
- 8096:
deque::at()
throws std::range_error
instead of std::out_of_range
- 8127:
cout << cin.rdbuf()
infinite loop
- 8218: Excessively large memory consumed for classes with large array members
- 8287: GCC 3.2: Destructor called for non-constructed local object
- 8347: empty vector range used in string construction causes core dump
- 8348:
fail()
flag is set in istringstream
when eof()
flag is set
- 8391: regression: infinite loop in
cp/decl2.c(finish_file)
C and optimizer bugs
- 6627:
-fno-align-functions
doesn't seem to disable function alignment
- 6631:
life_analysis
misoptimizes code to initialize fields of a structure
- 7102: unsigned char division results in floating exception
- 7120: Run once loop should *always* be unrolled (pessimization)
- 7209: Bug involving array referencing and
?:
operator
- 7515: invalid inlining of global function with
-O3
- 7814: incorrect scheduling for glibc-2.2.92 strcpy test
- 8467: bug in sibling call optimization
Preprocessor bugs
- 4890: incorrect line markers from the traditional preprocessor
- 7357:
-M
option omits system headers files (making it the same as -MM
)
- 7358: Changes to Sun's
make
Dependencies
- 7602: C++ header files found in
CPLUS_INCLUDE_PATH
treated as C headers
- 7862: Interrupting
GCC -MD
removes .d
file but not .o
- 8190: Failed compilation deletes
-MD
dependency file
- 8524:
_Pragma
within macro is improperly expanded
x86 specific (Intel/AMD)
- 5351: (i686-only) function pass-by-value structure copy corrupts stack
(7591 is a duplicate)
- 6845,
7034,
7124,
7174: ICE's with
-march=pentium3/pentium2/athlon
(these are all the same underlying bug, in MMX register use)
- 7134,
7375,
7390: ICE with
-march=athlon
(maybe same as above?)
- 6890:
xmmintrin.h
, _MM_TRANSPOSE4_PS
is broken
- 6981: wrong code in 64-bit manipulation on x86
- 7242:
GCC -mcpu=pentium[23]
doesn't define __tune_pentiumpro__
macro
- 7396: ix86:
cmpgt_ss
, cmpge_ss
, cmpngt_ss
, and cmpnge_ss
SSE intrinsics are broken
- 7630: GCC 3.2 breaks on Mozilla 1.0's JS sources with
-march=pentium4
- 7693: Typo in i386
mmintrin.h
header
- 7723: ICE - Pentium3 sse - GCC 3.2
- 7951: ICE on
-march=pentium4 -O2 -mfpmath=sse
- 8146: (i686 only) gcc 3.2 miscompiles gcc 2.95.3
PowerPC specific
- 5967: GCC bug when profiling nested functions on powerpc
- 6984: wrong code generated with
-O2
, -O3
, -Os
for do-while loop on PowerPC
- 7114: PowerPC: ICE building
strcoll.op
from glibc-2.2.5
- 7130: miscompiled code for GCC-3.1 in powerpc linux with
-funroll-all-loops
- 7133: PowerPC ICE: unrecognizable insn
- 7380: ICE in
extract_insn
, at recog.c:2148
- 8252: ICE on Altivec code with optimization turned on
- 8451: Altivec ICE in GCC 3.2
HP/PA specific
- 7250:
__ashrdi3
returns wrong value on 32 bit hppa
SPARC specific
- 6668: when using
--disable-multilib
, libgcc_s.so
is installed in the wrong place on sparc-solaris
- 7151: ICE when compiling for UltraSPARC
- 7335: SPARC: ICE in
verify_wide_reg (flow.c:557)
with long double and -O1
- 7842: [REGRESSION] SPARC code gen bug
ARM specific
- 7856: [arm] invalid offset in constant pool reference
- 7967: optimization produces wrong code (ARM)
Alpha specific
- 7374:
__builtin_fabsl
broken on alpha
IBM s390 specific
- 7370: ICE in
fixup_var_refs_1
on s390x
- 7409: loop optimization bug on s390x-linux-gnu
- 8232: s390x: ICE when using bcmp with
int
length argument
SCO specific
- 7623: SCO OpenServer build fails with
machmode.def: undefined symbol: BITS_PER_UNIT
m68k/Coldfire specific
- 8314:
crtbegin
, crtend
need to be multilib'ed for this platform
Documentation
- 761: Document some undocumented options
- 5610: Fix documentation about invoking SSE instructions (
-mfpmath=sse
)
- 7484: List
-Wmissing-declarations
as C-only option
- 7531:
-mcmodel
not documented for x86-64
- 8120: Update documentation of bad use of
##
3.2 is a small bug fix release, but there is a change to the application
binary interface (ABI), hence the change to the second part of the version
number.
The main purpose of the 3.2 release is to correct a couple of problems in
the C++ ABI, with the intention of providing a stable interface going
forward. Accordingly, 3.2 is only a small change to 3.1.1.
Bug Fixes
C++
- 7320: g++ 3.2 relocation problem
- 7470: vtable: virtual function pointers not in declaration order
libstdc++
- 6410: Trouble with non-ASCII monetary symbols and
wchar_t
- 6503,
6642,
7186: Problems with comparing or subtracting various types of const and non-const iterators
- 7216: ambiguity with
basic_iostream::traits_type
- 7220: problem with
basic_istream::ignore(0,delimiter)
- 7222:
locale::operator==()
doesn't work on std::locale("")
- 7286: placement operator delete issue
- 7442:
cxxabi.h
does not match the C++ ABI
- 7445: poor performance of
std::locale::classic()
in multi-threaded applications
x86-64 specific
- 7291: off-by-one in generated inline
bzero
code for x86-64
Please send FSF & GNU inquiries & questions to
gnu@gnu.org.
There are also other ways
to contact the FSF.
These pages are maintained by
The GCC team.
Please send comments on these web pages and GCC to our public
mailing list at gcc@gnu.org or
gcc@gcc.gnu.org,
send other questions to gnu@gnu.org.
Copyright (C) Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111, USA.
Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.
Last modified 2003-04-23
|
|