]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix PR87374: ICE with -mslow-flash-data and -mword-relocations
authorThomas Preud'homme <thomas.preudhomme@linaro.org>
Wed, 31 Oct 2018 10:05:54 +0000 (10:05 +0000)
committerThomas Preud'homme <thopre01@gcc.gnu.org>
Wed, 31 Oct 2018 10:05:54 +0000 (10:05 +0000)
commit6dc8ee419ea91a2641e35b7b00b81639f5bb4a8e
tree6c961f24d64d8d5e92316459ffdcfc5ac195e8d5
parent563cc649beaf11d707c422e5f4e9e5cdacb818c3
Fix PR87374: ICE with -mslow-flash-data and -mword-relocations

GCC ICEs under -mslow-flash-data and -mword-relocations because there
is no way to load an address, both literal pools and MOVW/MOVT being
forbidden. This patch gives an error message when both options are
specified by the user and adds the according dg-skip-if directives for
tests that use either of these options. It also explicitely set the
option when in PIC mode as per documentation rather than always check
for target_word_relocation together with flag_pic.

2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

    gcc/
    PR target/87374
    * config/arm/arm.c (arm_option_check_internal): Disable the combined
    use of -mslow-flash-data and -mword-relocations.
    (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
    * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
    flag_pic.
    * doc/invoke.texi (-mword-relocations): Mention conflict with
    -mslow-flash-data.
    (-mslow-flash-data): Reciprocally.

    gcc/testsuite/
    PR target/87374
    * gcc.target/arm/movdi_movt.c: Skip if both -mslow-flash-data and
    -mword-relocations would be passed when compiling the test.
    * gcc.target/arm/movsi_movt.c: Likewise.
    * gcc.target/arm/pr81863.c: Likewise.
    * gcc.target/arm/thumb2-slow-flash-data-1.c: Likewise.
    * gcc.target/arm/thumb2-slow-flash-data-2.c: Likewise.
    * gcc.target/arm/thumb2-slow-flash-data-3.c: Likewise.
    * gcc.target/arm/thumb2-slow-flash-data-4.c: Likewise.
    * gcc.target/arm/thumb2-slow-flash-data-5.c: Likewise.
    * gcc.target/arm/tls-disable-literal-pool.c: Likewise.

From-SVN: r265662
14 files changed:
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.md
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/movdi_movt.c
gcc/testsuite/gcc.target/arm/movsi_movt.c
gcc/testsuite/gcc.target/arm/pr81863.c
gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-1.c
gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-2.c
gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-3.c
gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-4.c
gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-5.c
gcc/testsuite/gcc.target/arm/tls-disable-literal-pool.c