public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, testsuite] Fix broken pr80341.c for avr
@ 2017-04-19 12:00 Senthil Kumar Selvaraj
  0 siblings, 0 replies; only message in thread
From: Senthil Kumar Selvaraj @ 2017-04-19 12:00 UTC (permalink / raw)
  To: gcc-patches

Hi,

  This patch skips pr80341.c for targets with int size less than 32 bits.
  The assertion in the testcase holds only if sizeof(int) > sizeof(short), 
  which isn't true for smaller int size targets like the avr.

  Specifically, after integer promotion, the "usual arithmetic
  conversion" of the unsigned short to signed int doesn't occur, and
  this causes the test to fail.

  Committed as obvious.

Regards
Senthil

2017-04-19  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

	* gcc.dg/torture/pr80341.c: Require int32plus.

Index: gcc.dg/torture/pr80341.c
===================================================================
--- gcc.dg/torture/pr80341.c	(revision 246991)
+++ gcc.dg/torture/pr80341.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-additional-options "-Wno-overflow" } */
+/* { dg-require-effective-target int32plus } */
 
 const signed char c = -84;
 signed char s;

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

only message in thread, other threads:[~2017-04-19 11:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 12:00 [Patch, testsuite] Fix broken pr80341.c for avr Senthil Kumar Selvaraj

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