GCC Bugzilla – Attachment 31145 Details for
Bug 58970
[4.7 Regression] internal compiler error: in get_bit_range, at expr.c:4562
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
For a possible patch.
patch-pr58970.diff (text/plain), 961 bytes, created by
Bernd Edlinger
on 2013-11-03 19:14:49 UTC
(
hide
)
Description:
For a possible patch.
Filename:
MIME Type:
Creator:
Bernd Edlinger
Created:
2013-11-03 19:14:49 UTC
Size:
961 bytes
patch
obsolete
>Index: gcc/expr.c >=================================================================== >--- gcc/expr.c (revision 204333) >+++ gcc/expr.c (working copy) >@@ -4553,7 +4553,7 @@ get_bit_range (unsigned HOST_WIDE_INT *bitstart, > int volatilep = 0; > get_inner_reference (TREE_OPERAND (exp, 0), &rbitsize, &rbitpos, > &roffset, &rmode, &unsignedp, &volatilep, false); >- if ((rbitpos % BITS_PER_UNIT) != 0) >+ if ((rbitpos % BITS_PER_UNIT) != 0 || rbitpos < 0) > { > *bitstart = *bitend = 0; > return; >Index: gcc/testsuite/gcc.dg/pr58970.c >=================================================================== >--- gcc/testsuite/gcc.dg/pr58970.c (revision 0) >+++ gcc/testsuite/gcc.dg/pr58970.c (revision 0) >@@ -0,0 +1,18 @@ >+/* PR middle-end/58970 */ >+/* { dg-do compile } */ >+/* { dg-options "-O2" } */ >+ >+struct S >+{ >+ struct >+ { >+ int b:1; >+ } mode[1]; >+}; >+ >+void >+foo (int x, struct S *s) >+{ >+ if (x == -1) >+ s->mode[x].b = 0; >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 58970
:
31145
|
31147
|
31169