Commit 5719731f by Robin Dapp Committed by Robin Dapp

S/390: Fix larl/PIC test case.

This patch adds -march=z900 to a test case that expects larl for loading
a value via the GOT.  On z10 and later, lgrl is used which is tested in
a new, separate test case.

gcc/testsuite/ChangeLog:

2019-05-17  Robin Dapp  <rdapp@linux.ibm.com>

  * gcc.target/s390/global-array-element-pic.c: Add -march=z900.
  * gcc.target/s390/global-array-element-pic2.c: New test for z10+.

From-SVN: r271321
parent c4499192
2019-05-17 Robin Dapp <rdapp@linux.ibm.com>
* gcc.target/s390/global-array-element-pic.c: Add -march=z900.
* gcc.target/s390/global-array-element-pic2.c: New test for z10+.
2019-05-17 Richard Biener <rguenther@suse.de>
* gcc.dg/gimplefe-41.c: New testcase.
......
/* Test accesses to global array elements in PIC code. */
/* { dg-do compile } */
/* { dg-options "-O1 -fPIC" } */
/* { dg-options "-O1 -march=z900 -fPIC" } */
extern char a[] __attribute__ ((aligned (2)));
extern char *b;
......
/* Test accesses to global array elements in PIC code. */
/* { dg-do compile } */
/* { dg-options "-O1 -march=z10 -fPIC" } */
extern char a[] __attribute__ ((aligned (2)));
extern char *b;
void c()
{
b = a + 4;
/* { dg-final { scan-assembler {(?n)\n\tlgrl\t%r\d+,a@GOTENT\n} } } */
/* { dg-final { scan-assembler-not {(?n)\n\tlarl\t%r\d+,a[^@]} } } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment