public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Add patch for PR 70292
@ 2016-03-31 14:55 Andrey Belevantsev
  0 siblings, 0 replies; only message in thread
From: Andrey Belevantsev @ 2016-03-31 14:55 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

Hello,

PR 70292 turned out to be the duplicate of PR 64411, which is already fixed 
on trunk, but still the testcase from the PR is worth adding.  It can be 
tortured instead of being a target test, and also this PR showed that 64411 
is a regression and should be backported to gcc-5-branch.

Committed the test to trunk.  I don't think we need it for gcc-5 though.

Andrey

[-- Attachment #2: pr70292.diff --]
[-- Type: text/x-patch, Size: 1023 bytes --]

Index: gcc/testsuite/gcc.dg/pr70292.c
===================================================================
*** gcc/testsuite/gcc.dg/pr70292.c	(revision 0)
--- gcc/testsuite/gcc.dg/pr70292.c	(revision 234627)
***************
*** 0 ****
--- 1,12 ----
+ /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
+ /* { dg-options "-O1 -fno-inline -fno-dce -fschedule-insns -fselective-scheduling -fno-tree-dce" } */
+ 
+ void bar() {}
+ 
+ int t106_1mul(unsigned int x, unsigned int y) {
+     int r;
+     if (__builtin_mul_overflow(x, y, &r)) {
+         bar();
+     }
+     return r;
+ }
Index: gcc/testsuite/ChangeLog
===================================================================
*** gcc/testsuite/ChangeLog	(revision 234626)
--- gcc/testsuite/ChangeLog	(revision 234627)
***************
*** 1,3 ****
--- 1,8 ----
+ 2016-03-31  Andrey Belevantsev  <abel@ispras.ru>
+ 
+ 	PR target/70292
+ 	* gcc.c-torture/pr70292.c: New test.
+ 
  2016-03-31  Marek Polacek  <polacek@redhat.com>
  
  	PR c/70297

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

only message in thread, other threads:[~2016-03-31 14:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-31 14:55 [committed] Add patch for PR 70292 Andrey Belevantsev

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).