[testsuite] Fix broken pr80341.c for avr

Submitted by Senthil Kumar Selvaraj on April 19, 2017, 11:27 a.m.

Details

Message ID 87o9vsy6vz.fsf@microchip.com
State New
Headers show

Commit Message

Senthil Kumar Selvaraj April 19, 2017, 11:27 a.m.
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.

Patch hide | download patch | download mbox

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;