This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/71700] [5/6 Regression] wrong code with struct assignment with sub-word signed bitfields
- From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 22 Aug 2016 14:28:38 +0000
- Subject: [Bug middle-end/71700] [5/6 Regression] wrong code with struct assignment with sub-word signed bitfields
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-71700-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71700
--- Comment #5 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Mon Aug 22 14:28:05 2016
New Revision: 239660
URL: https://gcc.gnu.org/viewcvs?rev=239660&root=gcc&view=rev
Log:
[expr.c] PR middle-end/71700: zero-extend sub-word value when widening
constructor element
Backport from mainline
2016-07-12 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR middle-end/71700
* expr.c (store_constructor): Mask sign-extended bits when widening
sub-word constructor element at the start of a word.
* gcc.c-torture/execute/pr71700.c: New test.
Added:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr71700.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/expr.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog