Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/sh
0002 # SPDX-License-Identifier: GPL-2.0
0003 # Borrowed from gcc: gcc/testsuite/gcc.target/s390/nobp-section-type-conflict.c
0004 # Checks that we don't get error: section type conflict with ‘put_page’.
0005 
0006 cat << "END" | $@ -x c - -fno-PIE -march=z10 -mindirect-branch=thunk-extern -mfunction-return=thunk-extern -mindirect-branch-table -O2 -c -o /dev/null
0007 int a;
0008 int b (void);
0009 void c (int);
0010 
0011 static void
0012 put_page (void)
0013 {
0014   if (b ())
0015     c (a);
0016 }
0017 
0018 __attribute__ ((__section__ (".init.text"), __cold__)) void
0019 d (void)
0020 {
0021   put_page ();
0022   put_page ();
0023 }
0024 END