re PR debug/83666 (ICE: SIGFPE with -O2 -g --param=sccvn-max-scc-size=10)

PR debug/83666
	* cfgexpand.c (expand_dbeug_expr) <case BIT_FIELD_REF>: Punt if mode
	is BLKmode and bitpos not zero or mode change is needed.

	* gcc.dg/pr83666.c: New test.

From-SVN: r256232
This commit is contained in:
Jakub Jelinek 2018-01-04 12:44:07 +01:00 committed by Jakub Jelinek
parent 32489ab56a
commit c54af0682c
4 changed files with 40 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2018-01-04 Jakub Jelinek <jakub@redhat.com>
PR debug/83666
* cfgexpand.c (expand_dbeug_expr) <case BIT_FIELD_REF>: Punt if mode
is BLKmode and bitpos not zero or mode change is needed.
2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
PR target/83675

View File

@ -4560,7 +4560,7 @@ expand_debug_expr (tree exp)
if (maybe_lt (bitpos, 0))
return NULL;
if (GET_MODE (op0) == BLKmode)
if (GET_MODE (op0) == BLKmode || mode == BLKmode)
return NULL;
poly_int64 bytepos;

View File

@ -1,3 +1,8 @@
2018-01-04 Jakub Jelinek <jakub@redhat.com>
PR debug/83666
* gcc.dg/pr83666.c: New test.
2018-01-04 Uros Bizjak <ubizjak@gmail.com>
PR target/83628

View File

@ -0,0 +1,28 @@
/* PR debug/83666 */
/* { dg-do compile } */
/* { dg-options "-O2 -g --param=sccvn-max-scc-size=10 -Wno-psabi" } */
typedef int __attribute__ ((vector_size (64))) V;
int c, d;
short e;
V g;
V
bar (void)
{
g[1] = d;
do
{
e += c;
g = g > 0;
}
while (g[1]);
return g;
}
void
foo (void)
{
int x = bar ()[3];
}