| 1 |
#!/bin/sh |
| 2 |
# SPDX-License-Identifier: GPL-2.0 |
| 3 |
# Borrowed from gcc: gcc/testsuite/gcc.target/s390/nobp-section-type-conflict.c |
| 4 |
# Checks that we don't get error: section type conflict with ‘put_page’. |
| 5 |
|
| 6 |
cat << "END" | $@ -x c - -fno-PIE -march=z10 -mindirect-branch=thunk-extern -mfunction-return=thunk-extern -mindirect-branch-table -O2 -c -o /dev/null |
| 7 |
int a; |
| 8 |
int b (void); |
| 9 |
void c (int); |
| 10 |
|
| 11 |
static void |
| 12 |
put_page (void) |
| 13 |
{ |
| 14 |
if (b ()) |
| 15 |
c (a); |
| 16 |
} |
| 17 |
|
| 18 |
__attribute__ ((__section__ (".init.text"), __cold__)) void |
| 19 |
d (void) |
| 20 |
{ |
| 21 |
put_page (); |
| 22 |
put_page (); |
| 23 |
} |
| 24 |
END |