https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87374
--- Comment #5 from Thomas Preud'homme <thopre01 at gcc dot gnu.org> --- Author: thopre01 Date: Wed Oct 31 10:05:54 2018 New Revision: 265662 URL: https://gcc.gnu.org/viewcvs?rev=265662&root=gcc&view=rev Log: 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.preudho...@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. Modified: trunk/gcc/ChangeLog trunk/gcc/config/arm/arm.c trunk/gcc/config/arm/arm.md trunk/gcc/doc/invoke.texi trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.target/arm/movdi_movt.c trunk/gcc/testsuite/gcc.target/arm/movsi_movt.c trunk/gcc/testsuite/gcc.target/arm/pr81863.c trunk/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-1.c trunk/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-2.c trunk/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-3.c trunk/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-4.c trunk/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data-5.c trunk/gcc/testsuite/gcc.target/arm/tls-disable-literal-pool.c