public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6825] Re: trapv question
@ 2021-01-20 21:31 Andrew Macleod
  0 siblings, 0 replies; only message in thread
From: Andrew Macleod @ 2021-01-20 21:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:842afc4e289ed3fe69583672c1a180f268d73799

commit r11-6825-g842afc4e289ed3fe69583672c1a180f268d73799
Author: Andrew MacLeod <amacleod@redhat.com>
Date:   Wed Jan 20 16:27:34 2021 -0500

    Re: trapv question
    
    Adjust testcase to so the ADD that is expected to overflow cannot
    be optimized.
    
            gcc/testsuite
            * gcc.dg/torture/ftrapv-2.c: Make overflow instruction unremovable.

Diff:
---
 gcc/testsuite/gcc.dg/torture/ftrapv-2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/torture/ftrapv-2.c b/gcc/testsuite/gcc.dg/torture/ftrapv-2.c
index 75e464fe557..4d746c9ce5c 100644
--- a/gcc/testsuite/gcc.dg/torture/ftrapv-2.c
+++ b/gcc/testsuite/gcc.dg/torture/ftrapv-2.c
@@ -12,7 +12,7 @@
 
 /* Verify SImode operations properly trap.  PR middle-end/68046 */
 
-int i = 0x7fffffff;
+volatile int i = 0x7fffffff;
 
 int main(void)
 {
@@ -20,7 +20,7 @@ int main(void)
   int status = 0;
   if (child == 0)
     {
-      volatile int x = i + 1 < i;
+      i = i + 1;
       exit (0);
     }
   else if (child == -1)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-20 21:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 21:31 [gcc r11-6825] Re: trapv question Andrew Macleod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).