Skip to content

Commit ba34b26

Browse files
brobeckeAlexandre Oliva
authored and
Alexandre Oliva
committed
compile gcc.target/arm/{pr78255-2.c,memset-inline-2.c} with -mno-long-calls
If the target is configured such that -mlong-call is passed by default, the function calls these tests are trying to detect by scanning the assembly file are performed using long calls, like so: | foo: | @ memset-inline-2.c:12: memset (a, -1, 14); | mov r2, gcc-mirror#14 @, | mvn r1, #0 @, | ldr r0, .L2 @, | ldr r3, .L2+4 @ tmp112, | bx r3 @ tmp112 Looking at .L2 (and in particular at .L2+4): | .L2: | .word a | .word memset <<<--- This change adds -mno-long-calls to the list of compiler options to make sure we generate short call code, allowing the assembly matching to pass. This is added unconditionally to the dg-options (as opposed to using dg-additional-options) because this test is already specific to ARM targets, and -mno-long-calls is available on all ARM targets. for gcc/testsuite/ChangeLog * gcc.target/arm/memset-inline-2.c: Add -mno-long-calls to the test's dg-options. * gcc.target/arm/pr78255-2.c: Likewise.
1 parent 7ba5ce3 commit ba34b26

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gcc/testsuite/gcc.target/arm/memset-inline-2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* { dg-do run } */
2-
/* { dg-options "-save-temps -Os -fno-inline" } */
2+
/* { dg-options "-save-temps -Os -fno-inline -mno-long-calls" } */
33

44
#include <string.h>
55
#include <stdlib.h>

gcc/testsuite/gcc.target/arm/pr78255-2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* { dg-do compile } */
2-
/* { dg-options "-O2" } */
2+
/* { dg-options "-O2 -mno-long-calls" } */
33

44
extern int bar (void *);
55

0 commit comments

Comments
 (0)