Activity log for bug #1763050

Date Who What changed Old value New value Message
2018-04-11 14:30:56 aoandr bug added bug
2018-04-11 14:30:56 aoandr attachment added test case https://bugs.launchpad.net/bugs/1763050/+attachment/5110811/+files/sample.tar.xz
2018-04-11 14:31:30 aoandr summary GCC 7.2.1 with LTO reports GCC 7.2.1 with LTO reports "Error: offset out of range"
2018-04-11 14:42:21 Thomas Preud'homme gcc-arm-embedded: status New Confirmed
2018-04-11 21:30:53 aoandr description Version: GNU Tools for Arm Embedded Processors 7-2017-q4-major Original build, downloaded from developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads Running on Ubuntu 16.04.4 LTS (xenial), x86_64 The test case is attached to the bug report. To run the test case: - $ tax xaf "the_test_archive.tar.xz" - $ cd test/ - $ ./build.sh The output contains the error message like: /tmp/ccXrBd4D.s:27: Error: offset out of range The archive contains the full output as captured on my host, see test/out.txt Also, the ccXrBd4D.s file is stored in the same directory for reference. This problem does not show up when running GCC 6.3.1 (6-2017-q2-update). Without -flto flag the original project compiles and runs fine (by GCC 7 or 6). Adding the "-ffunction-sections" parameter to the linking stage seems to eliminate the problem. The offending line 27 of the assembler code is: ldr.w r0, =0xE000ED88 The line comes from the FreeRTOS "naked" function vPortEnableVFP(), which contains an __asm() statement. In the original project I also encountered the same error triggered at another line: ldr r0, =0xE000ED08 this asm instruction is from the __asm() statement in function prvPortStartFirstTask(). My original project triggered error messages at both lines, but one of the errors was gone during source reduction. The provided test code is radically reduced with creduce after pre-processing. So, the type definitions in different files are not aligned. Minor changes to the source code make the error disappear. When I tried to synchronize the type definitions in different files, the problem went away. Version: GNU Tools for Arm Embedded Processors 7-2017-q4-major Original build, downloaded from developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads Running on Ubuntu 16.04.4 LTS (xenial), x86_64 The test case is attached to the bug report. To run the test case: - $ tar xaf "the_test_archive.tar.xz" - $ cd test/ - $ ./build.sh The output contains the error message like: /tmp/ccXrBd4D.s:27: Error: offset out of range The archive contains the full output as captured on my host, see test/out.txt Also, the ccXrBd4D.s file is stored in the same directory for reference. This problem does not show up when running GCC 6.3.1 (6-2017-q2-update). Without -flto flag the original project compiles and runs fine (by GCC 7 or 6). Adding the "-ffunction-sections" parameter to the linking stage seems to eliminate the problem. The offending line 27 of the assembler code is: ldr.w r0, =0xE000ED88 The line comes from the FreeRTOS "naked" function vPortEnableVFP(), which contains an __asm() statement. In the original project I also encountered the same error triggered at another line: ldr r0, =0xE000ED08 this asm instruction is from the __asm() statement in function prvPortStartFirstTask(). My original project triggered error messages at both lines, but one of the errors was gone during source reduction. The provided test code is radically reduced with creduce after pre-processing. So, the type definitions in different files are not aligned. Minor changes to the source code make the error disappear. When I tried to synchronize the type definitions in different files, the problem went away.
2018-04-13 13:38:21 Thomas Preud'homme gcc-arm-embedded: status Confirmed Won't Fix