Appendix A. Sourcery CodeBench Lite Release Notes

This appendix contains information about changes in this release of Sourcery CodeBench Lite for ARM SymbianOS. You should read through these notes to learn about new features and bug fixes.

Table of Contents

A.1. Changes in Sourcery CodeBench Lite for ARM SymbianOS

A.1. Changes in Sourcery CodeBench Lite for ARM SymbianOS

This section documents Sourcery CodeBench Lite changes for each released revision.

A.1.1. Changes in Sourcery CodeBench Lite 2012.03-42

Nondeterministic code generation bug fix.  A GCC bug has been fixed that caused nondeterministic code generation for some input files when optimizing.

Installer failure during upgrade.  Some recent releases were affected by an installer bug on Windows hosts that caused installing a newer version of Sourcery CodeBench Lite into the same directory to fail with the error Sourcery CodeBench Lite for ARM SymbianOS upgrade failed. This bug has now been fixed, but the affected releases cannot be upgraded. As a workaround, uninstall the older release before installing the new version.

A.1.2. Changes in Sourcery CodeBench Lite 2012.03-24

New Sourcery CodeBench Lite branding.  Sourcery G++ has been renamed to Sourcery CodeBench. This change affects the names of the default installation directory and installer-created shortcuts, but no internal pathnames or tool names within the installation directory have been changed.

Fix for internal compiler error.  A bug that caused GCC to report an internal compiler error in push_minipool_fix has been fixed.

Internal compiler error with NEON intrinsics.  A compiler bug has been fixed that caused internal compiler errors when using certain NEON intrinsics.

Fix for compiler hang.  A bug that caused GCC to become stuck in an infinite loop in the optimizer has been fixed.

Internal compiler error.  A GCC bug has been fixed that caused an internal compiler error when sign extending the result of an array subscript expression with an index greater than 255.

GCC version 4.6.  Sourcery CodeBench Lite for ARM SymbianOS is now based on GCC version 4.6. For more information about changes from GCC version 4.5 that was included in previous releases, see http://gcc.gnu.org/gcc-4.6/changes.html.

Fix for internal compiler error.  A GCC bug has been fixed that caused an internal compiler error when using pointer casts in C++0x constexpr initialization expressions.

ARM VFP9-S errata workaround.  A compiler workaround for ARM Errata Notice GENC-010704 (760019: Canceled FDIV or FSQRT can be executed twice) has been implemented.

Fix for bit-field optimization bug.  A compiler bug that caused incorrect code to be generated for programs using bit-fields has been fixed.

Additional library required on link command line.  Due to internal changes in GCC's support library configuration, you must now include -lgcc_eh on the link command line for SymbianOS applications to avoid undefined symbol errors for exception handling support functions.

GCC version 4.6.3.  Sourcery CodeBench Lite for ARM SymbianOS is now based on GCC version 4.6.3. For more information about issues that have been fixed since version 4.6.1, see http://gcc.gnu.org/gcc-4.6/changes.html.

Map file name demangling bug fix.  GCC now properly passes the --demangle and --no-demangle options to the linker to control map file output. The default behavior on all hosts is now to demangle C++ names.

GCC stack usage improvement.  GCC now generates better code for stack allocation in some cases when compiling with -fno-strict-aliasing.

ARM miscompilation fix.  A bug has been fixed that caused miscompilation of some expressions involving the minimum or maximum idiom, such as (a > 0) ? a : 0.

Linker --gc-sections option bug fix.  A bug has been fixed that caused the linker to incorrectly remove the .debug_types section when using the --gc-sections option.

Binutils version 2.21.  Sourcery CodeBench Lite for ARM SymbianOS is now based on binutils version 2.21.

Assembler crash.  The assembler now warns when there is line information for the *ABS* section, rather than crash. This can occur when the .offset directive is used incorrectly.

Changes to host operating system requirements.  The minimum required Microsoft Windows OS needed to run Sourcery CodeBench Lite is now Windows XP (SP1).

A.1.3. Changes in Sourcery G++ Lite 2011.03-45

Variable Length Array (VLA) alignment bug.  A compiler bug that resulted in incorrectly aligned variable length arrays (VLA) in leaf functions has been fixed.

Cortex-R5 support.  Sourcery G++ now includes support for ARM Cortex-R5 processors. To compile for these processors, use -mcpu=cortex-r5.

Inline assembly and volatile fields.  A bug has been fixed that caused the compiler to incorrectly reject inline asm statements referring to volatile class/struct fields with errors such as error: output number 1 not directly addressable.

Incorrect C++ warning fixed.  A bug in GCC has been fixed that caused spurious warnings about lambda expressions in C++ code that does not use them.

Fixed-point arithmetic support.  Experimental compiler support has been added for fixed-point arithmetic on ARM, as described in the draft ISO/IEC technical report TR 18037. Specialized instructions defined in recent architecture versions for performing saturating arithmetic, etc. are used when available, but are not a prerequisite for using the new language features. See Section 3.6, “Fixed-Point Arithmetic” for further details.

C++ constructor bug fix.  A compiler bug has been fixed that caused incorrect code for C++ constructors for some class hierarchies that use virtual inheritance and include empty classes. At runtime, the incorrect constructors resulted in memory corruption or other errors.

Thumb debug information fix.  A compiler bug that resulted in incorrect debug information for Thumb code has been fixed. The incorrect information prevented single stepping through some code.

Internal compiler error with pointer casting.  A compiler bug has been fixed that caused internal compiler errors when accessing double-word memory locations with casted pointers under ARM mode.

Unaligned access support.  The compiler now generates more efficient code for accessing packed data structures and for copying small blocks of unaligned data when targeting architectures that permit unaligned word/halfword accesses. This feature can be controlled by the -munaligned-access and -mno-unaligned-access options, and is enabled by default for ARMv6 processors and above, except for ARMv6-M.

Internal compiler error under Thumb mode.  A compiler bug has been fixed that caused internal compiler errors when generating Thumb code.

A.1.4. Changes in Sourcery G++ Lite 2011.03-8

Incorrect code for built-in comparison functions.  A bug has been fixed that sometimes caused GCC's built-in comparison functions, such as __builtin_isgreaterequal, to incorrectly raise exceptions when invoked on unordered floating-point arguments.

GCC fixes for -fstrict-volatile-bitfields GCC now honors -fstrict-volatile-bitfields when a bitfield is not declared volatile initially, but an object including bit fields is cast to volatile. Also, a bug was fixed that caused incorrect code to be generated for some stores to volatile bit fields when -fstrict-volatile-bitfields is enabled.

Compiler optimization improvements.  The compiler has been enhanced with a number of optimization improvements, including:

  • Smaller and faster code for compound conditionals.
  • Removal of superfluous sign and zero extensions.
  • Improved code for multiply-and-accumulate operations on ARM.

Internal compiler error with NEON intrinsics.  A compiler bug has been fixed that caused internal compiler errors when using certain NEON intrinsics.

GCC version 4.5.2.  Sourcery G++ Lite for ARM SymbianOS is now based on GCC version 4.5.2.

GCC code generation bug for casts to volatile types.  A compiler bug has been fixed that sometimes caused incorrect code for references to pointers to types with volatile casts.

Incorrect optimization fix.  An optimizer bug that in rare cases caused incorrect code to be generated for complex AND and OR expressions containing redundant subexpressions has been fixed.

GCC fixes for NEON in big-endian mode.  Several compiler bugs have been fixed that could lead to incorrect code when using NEON in big-endian mode. The problems only manifested when using the auto-vectorizer (enabled by default at the -O3 optimization level) with the -mvectorize-with-neon-quad option.

C++ exception handling.  A defect in the implementation of the EH-ABI specification has been fixed. The defect affected the catching of pointer types in code generated by the ARM RealView® compiler but using the Sourcery G++ runtime libraries. The fix also retains backward compatibility with existing GCC-compiled code.

GCC bug where accesses to volatile structure fields are optimized away.  A bug has been fixed where accesses to volatile fields of a structure were sometimes incorrectly optimized away if the structure instance was defined as non-volatile.

Internal compiler error fixes.  Two bugs have been fixed that caused compiler crashes in rare cases. The first bug involved code with multiple comparison operations, and the second one involved char to int conversion.

Thumb-2 assembler validation fix.  The assembler now correctly rejects Thumb-2 ADD, ADDS, SUB, and SUBS instructions that have an invalid shift operand. Previously, invalid shift values were accepted and generated unpredictable instructions.

Objdump fix for multiple input files.  The Objdump utility did not produce correct disassembly when processing multiple input files. This has been fixed.

A.1.5. Changes in Sourcery G++ Lite 2010.09-54

GCC fix for duplicated symbols.  A GCC optimizer bug that caused multiple definitions of local symbols has been fixed. Code affected by the bug was rejected by the assembler.

NEON code generation fix.  A GCC bug has been fixed that resulted in an assembler error VFP/Neon double precision register expected.

Static data size improvement at -Os When optimizing for size, the compiler no longer implicitly adds padding bytes to align static and local arrays on word boundaries. This fixes static data size regressions introduced since GCC 4.4. The additional alignment is still used when optimizing for speed.

New -fstrict-volatile-bitfields option.  The compiler has a new option, -fstrict-volatile-bitfields, which forces access to a volatile structure member using the width that conforms to its type. This option is enabled by default to conform to the ARM EABI. Refer to the GCC manual for details.

Internal compiler error fixes.  A bug has been fixed that caused the compiler to crash on code containing a typedef alias for __builtin_va_list with option -femit-struct-debug-baseonly. A second bug has been fixed that caused a crash when compiling code using C99 variable-length arrays. Additionally, a compiler crash on code using 64-bit integer multiplications with NEON vectorization enabled has also been fixed.

NEON narrowing-move instructions.  The compiler now supports narrowing-move instructions when auto-vectorizing for NEON. Loops accessing arrays of char or short values are now more likely to be vectorized.

Improved support for atomic memory builtins.  The compiler support for built-in atomic memory access operations on ARMv7 targets has been improved. These builtins are documented in the GCC manual.

Linker debug information fix.  A bug in linker processing of debug information has been fixed. The bug sometimes prevented the Sourcery G++ debugger from displaying source code if the executable was linked with the --gc-sections option.

Absolute branch bug fixes.  A bug that caused the assembler to crash on a branch to an absolute address has been fixed. Linker handling of the resulting relocations has also been improved. Previously this caused an invalid switch to ARM mode on ARMv7-M devices.

VMOV instruction bug fix.  A bug that caused the assembler to incorrectly reject certain valid immediate operands for the VMOV instruction has been fixed.

A.1.6. Changes in Sourcery G++ Lite 2010.09-20

Changes to Sourcery G++ version numbering.  Sourcery G++ product and Lite toolchains now uniformly use a version numbering scheme of the form 2012.03-42. The major and minor parts of the version number, in this case 2012.03, identify the release branch, while the final component is a build number within the branch. There are also new preprocessor macros defined by the compiler for the version number components so that you may conditionalize code for Sourcery G++ or particular Sourcery G++ versions. Details are available in the Sourcery G++ Knowledge Base.

GCC fix for reference to undefined label.  A bug in the optimizer that caused GCC to emit references to undefined labels has been fixed.

Precision improvement with vectorization enabled.  The GCC auto-vectorizer no longer uses NEON floating-point instructions unless the -funsafe-math-optimizations option (implied by -ffast-math) is specified. This is because NEON hardware does not fully support the IEEE 754 standard for floating-point arithmetic. In particular, very small quantities may be flushed to zero.

Alignment attributes.  A bug has been fixed that caused the compiler to ignore alignment attributes of C++ static member variables where the attribute was present on the definition, but not the declaration.

naked attribute semantics.  The naked function attribute now also implies the noinline and noclone attributes. This fixes bugs resulting from invalid optimizations of functions with this attribute.

Stack corruption bug fix.  A bug in GCC has been fixed that caused stack corruption in functions with the interrupt attribute.

GCC bug fix for push multiple instruction generation.  A bug has been fixed that caused GCC to generate incorrect push multiple instructions, causing an assembler warning register range not in ascending order.

Thumb-2 internal compiler error fix.  A bug has been fixed that caused the compiler to crash when compiling Thumb-2 code using 64-bit integer arithmetic.

Compiler optimization improvements.  The compiler has been enhanced with a number of optimization improvements, including:

  • More efficient assignment for structures containing bitfields.
  • Better code for initializing C++ arrays with explicit element initializers.
  • Improved logic for eliminating/combining redundant comparisons in code with nested conditionals.
  • Better selection of loop variables, resulting in fewer temporaries and more efficient register usage.
  • More optimization of references to globals in position-independent code.
  • Various Thumb code generation improvements.
  • Better code when constant addresses are used as arguments to inline assembly statements.
  • Better code for copying small constant strings.
  • Improved tuning for Cortex-M4 processors.
  • Cortex-A9 specific tuning for VFP and NEON instructions.
  • Use of more NEON features.

Preprocessor symbols for floating-point calling convention.  Built-in preprocessor symbols __ARM_PCS and __ARM_PCS_VFP are now defined to indicate the current floating-point calling convention.

GCC version 4.5.1.  Sourcery G++ Lite for ARM SymbianOS is now based on GCC version 4.5.1. For more information about changes from GCC version 4.4 that was included in previous releases, see http://gcc.gnu.org/gcc-4.5/changes.html.

New -Wdouble-promotion warning option.  The compiler has a new option, -Wdouble-promotion, which enables warnings about implicit promotions of float values to double. This option is useful when compiling code for processors (such as ARM Cortex-M4) that have hardware support for single-precision floating-point arithmetic only, where unintentional use of double precision results in dramatically slower code.

C++ runtime symbol visibility.  A bug has been fixed that caused some symbols in the C++ runtime library (libsupc++.a) to have incorrect visibility attributes.

Linker bug fix.  A bug that caused the linker error relocation truncated to fit: R_ARM_THM_JUMP24 when linking some Thumb-2 applications has been fixed.

Assembler PC-relative store fix.  A bug that caused the assembler to reject some valid PC-relative store instructions has been fixed. It now issues a warning instead for architectures where these instructions are deprecated.

ARMv7-A linker bug fix.  A bug in the linker support for --fix-cortex-a8, which is enabled by default when linking ARMv7-A objects, has been fixed. Programs affected by the bug sometimes crashed with segmentation fault or illegal instruction errors.

Smaller C++ programs with -g An assembler bug has been fixed that caused unnecessary references to exception-handling routines from C++ programs when debug information is enabled. For programs that do not otherwise use exceptions, this change results in smaller code size.

Additional validation in the assembler.  The assembler now diagnoses an error, instead of producing an invalid object file, when directives such as .hidden are missing operands.

Assembler PC-relative load fix.  An assembler bug that caused the assembler to reject some references to global symbols has been fixed. This bug affected Thumb instructions of the form ldr r0, symbol.

Strip bug fix.  A bug in the strip and objcopy utilities, which resulted in stripped object files that the linker could not recognize, has been fixed.

Binutils update.  The binutils package has been updated to version 2.20.51.20100809 from the FSF trunk. This update includes numerous bug fixes.

A.1.7. Changes in Older Releases

For information about changes in older releases of Sourcery G++ Lite for ARM SymbianOS, please refer to the Getting Started guide packaged with those releases.