From: Andre Vieira Date: Tue, 8 Dec 2015 10:01:45 +0000 (+0000) Subject: builtin-return-1.c: Add an inline assembly read to make sure dummy is not optimized... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ceeb21ef31825ce5f7fca47797e2c724f406c444;p=gcc.git builtin-return-1.c: Add an inline assembly read to make sure dummy is not optimized away by LTO. 2015-12-08 Andre Vieira Joern Rennecke gcc/testsuite/ * gcc.dg/torture/stackalign/builtin-return-1.c: Add an inline assembly read to make sure dummy is not optimized away by LTO. Co-Authored-By: Joern Rennecke From-SVN: r231401 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5e95e2aef35..b84899fc60b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2015-12-08 Andre Vieira + Joern Rennecke + + * gcc.dg/torture/stackalign/builtin-return-1.c: Add an + inline assembly read to make sure dummy is not optimized + away by LTO. + 2015-12-08 Ilya Enkovich PR tree-optimization/68766 diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/builtin-return-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/builtin-return-1.c index af017532aeb..ec4fd8a9ef3 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/builtin-return-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/builtin-return-1.c @@ -26,15 +26,13 @@ int bar(int n) STACK_ARGUMENTS_SIZE)); } -char *g; - int main(void) { /* Allocate 64 bytes on the stack to make sure that __builtin_apply can read at least 64 bytes above the return address. */ char dummy[64]; - g = dummy; + __asm__ ("" : : "" (dummy)); if (bar(1) != 2) abort();