From: Eric Botcazou Date: Thu, 22 Nov 2018 16:29:50 +0000 (+0000) Subject: backport: re PR rtl-optimization/85925 (compilation of masking with 257 goes wrong... X-Git-Tag: releases/gcc-7.4.0~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce728b0c047a5237878fc30e107c592b95618945;p=thirdparty%2Fgcc.git backport: re PR rtl-optimization/85925 (compilation of masking with 257 goes wrong in combine at -02) Backport from mainline 2018-11-21 Jakub Jelinek PR rtl-optimization/85925 * gcc.c-torture/execute/20181120-1.c: Require effective target int32plus. (u): New variable. (main): Compare d against u.f1 rather than 0x101. Use 0x4030201 instead of 0x10101. From-SVN: r266384 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 58e8566b9e87..96fd6de6cf6a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2018-11-22 Eric Botcazou + + Backport from mainline + 2018-11-21 Jakub Jelinek + + PR rtl-optimization/85925 + * gcc.c-torture/execute/20181120-1.c: Require effective target + int32plus. + (u): New variable. + (main): Compare d against u.f1 rather than 0x101. Use 0x4030201 + instead of 0x10101. + 2018-11-21 Mihail Ionescu PR target/87867 diff --git a/gcc/testsuite/gcc.c-torture/execute/20181120-1.c b/gcc/testsuite/gcc.c-torture/execute/20181120-1.c index 21e5f7a71fe3..da3d4552a2ff 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20181120-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20181120-1.c @@ -1,4 +1,5 @@ /* PR rtl-optimization/85925 */ +/* { dg-require-effective-target int32plus } */ /* Testcase by */ int a, c, d; @@ -9,17 +10,18 @@ union U1 { unsigned f0; unsigned f1 : 15; }; +volatile union U1 u = { 0x4030201 }; int main (void) { for (c = 0; c <= 1; c++) { - union U1 f = {0x10101}; + union U1 f = {0x4030201}; if (c == 1) b; *e = f.f1; } - if (d != 0x101) + if (d != u.f1) __builtin_abort (); return 0;