public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/53438] [4.7 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
@ 2012-05-21 15:19 ` wschmidt at gcc dot gnu.org
  2012-05-21 15:22 ` wschmidt at gcc dot gnu.org
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-21 15:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #1 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-21 15:17:49 UTC ---
Created attachment 27462
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27462
Unreduced testcase


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
  2012-05-21 15:19 ` [Bug tree-optimization/53438] " wschmidt at gcc dot gnu.org
@ 2012-05-21 15:22 ` wschmidt at gcc dot gnu.org
  2012-05-22  5:35 ` [Bug tree-optimization/53438] [4.7/4.8 " pinskia at gcc dot gnu.org
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-21 15:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #2 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-21 15:21:19 UTC ---
Whoops, left off the compile command:

g++ -o YarrPattern.o -S  -O3 ./YarrPattern.ii


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store
@ 2012-05-21 15:23 wschmidt at gcc dot gnu.org
  2012-05-21 15:19 ` [Bug tree-optimization/53438] " wschmidt at gcc dot gnu.org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-21 15:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

             Bug #: 53438
           Summary: [4.7 Regression] Bitfield store replaced with
                    full-byte store
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: wschmidt@gcc.gnu.org
              Host: powerpc64-linux
            Target: powerpc64-linux
             Build: powerpc64-linux


Created attachment 27461
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27461
Reduced testcase

In the attached reduced testcase YarrPattern.ii, function void
JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin(bool) (struct
YarrPatternConstructor * const this, bool capture), the "capture" argument is
copied into a one-bit bitfield m_capture within an inlined constructor.  In
4.6, we get the proper read-modify-write code for the bitfield update.  In 4.7,
the value of capture is stored as a full byte instead.

In the 077t.cplxlower dump, we see:

<bb 8>:
  D.4581_14 = this_1(D)->m_alternative;
  D.3875.type = 7;
  D.3875.m_capture = capture_5(D);
  D.3875.m_invert = 0;
  ...

In 078t.sra:

<bb 8>:
  D.4581_14 = this_1(D)->m_alternative;
  SR.171_48 = 7;
  SR.172_47 = capture_5(D);
  SR.173_46 = 0;
  D.6531_55 = &MEM[(struct Vector *)D.4581_14].impl;
  MEM[(struct PatternTerm *)&t] = SR.171_48;
  MEM[(struct PatternTerm *)&t + 4B] = SR.172_47;
  t.m_invert = SR.173_46;
  ...

In 079t.copyrename3:

<bb 8>:
  D.4581_14 = this_1(D)->m_alternative;
  SR.171_48 = 7;
  capture_47 = capture_5(D);
  SR.173_46 = 0;
  D.6531_55 = &MEM[(struct Vector *)D.4581_14].impl;
  MEM[(struct PatternTerm *)&t] = SR.171_48;
  MEM[(struct PatternTerm *)&t + 4B] = capture_47;
  t.m_invert = SR.173_46;
  ...

In 149t.optimized:

<bb 9>:
  D.4581_14 = this_1(D)->m_alternative;
  D.6531_55 = &MEM[(struct Vector *)D.4581_14].impl;
  MEM[(struct PatternTerm *)&t] = 7;
  MEM[(struct PatternTerm *)&t + 4B] = capture_5(D);
  t.m_invert = 0;
  ...

The bitfield-ness of m_capture is lost along the way.  On powerpc64-linux, this
generates a store-byte instruction instead of a read-modify-write.

The reduced test doesn't show the correct code for 4.6 since the method in
question is discarded for whatever reason.  If needed, that can be seen in the
larger YarrPattern.orig.ii, also attached.

The regression remains in current trunk as well.

Sorry for the relatively large test, but delta couldn't reduce it further and
it didn't seem worthwhile to keep hacking on it by hand.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
  2012-05-21 15:19 ` [Bug tree-optimization/53438] " wschmidt at gcc dot gnu.org
  2012-05-21 15:22 ` wschmidt at gcc dot gnu.org
@ 2012-05-22  5:35 ` pinskia at gcc dot gnu.org
  2012-05-22  5:36 ` pinskia at gcc dot gnu.org
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-22  5:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.2
            Summary|[4.7 Regression] Bitfield   |[4.7/4.8 Regression]
                   |store replaced with         |Bitfield store replaced
                   |full-byte store             |with full-byte store


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-05-22  5:35 ` [Bug tree-optimization/53438] [4.7/4.8 " pinskia at gcc dot gnu.org
@ 2012-05-22  5:36 ` pinskia at gcc dot gnu.org
  2012-05-22  7:18 ` pinskia at gcc dot gnu.org
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-22  5:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-22 05:34:11 UTC ---
I see what happens.  I think SRA is taking the right hand side's type rather
than look at the left hand side where it is a bitfield.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-05-22  5:36 ` pinskia at gcc dot gnu.org
@ 2012-05-22  7:18 ` pinskia at gcc dot gnu.org
  2012-05-22 10:03 ` rguenth at gcc dot gnu.org
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-22  7:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.2                       |4.7.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-05-22  7:18 ` pinskia at gcc dot gnu.org
@ 2012-05-22 10:03 ` rguenth at gcc dot gnu.org
  2012-05-22 10:50 ` rguenth at gcc dot gnu.org
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-22 10:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-22 09:03:53 UTC ---
It should be a bitfield on both sides, otherwise the GIMPLE verifier would
complain.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-05-22 10:03 ` rguenth at gcc dot gnu.org
@ 2012-05-22 10:50 ` rguenth at gcc dot gnu.org
  2012-05-22 12:41 ` rguenth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-22 10:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-05-22
     Ever Confirmed|0                           |1

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-22 10:47:53 UTC ---
Confirmed.  The following C testcase works correctly:

struct S { _Bool b : 1; char c : 7; };
void bar (struct S s)
{
  if (s.c != 7)
    abort ();
}
int foo (_Bool b)
{
  struct S s;
  s.c = 7;
  s.b = b;
  bar (s);
  return s.c;
}

but for some reason your reduced testcase ends up producing a MEM_REF
instead of a component-ref to store b instead.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-05-22 10:50 ` rguenth at gcc dot gnu.org
@ 2012-05-22 12:41 ` rguenth at gcc dot gnu.org
  2012-05-22 13:19 ` wschmidt at gcc dot gnu.org
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-22 12:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-22 11:07:15 UTC ---
I think the following should fix it:

Index: gcc/tree-sra.c
===================================================================
--- gcc/tree-sra.c      (revision 187767)
+++ gcc/tree-sra.c      (working copy)
@@ -1001,9 +1001,10 @@ build_access_from_expr_1 (tree expr, gim
@@ -2096,9 +2097,12 @@ analyze_access_subtree (struct access *r
          && (TREE_CODE (root->type) != INTEGER_TYPE
              || TYPE_PRECISION (root->type) != root->size)
          /* But leave bitfield accesses alone.  */
-         && (root->offset % BITS_PER_UNIT) == 0)
+         && (TREE_CODE (root->expr) != COMPONENT_REF
+             || !DECL_BIT_FIELD (TREE_OPERAND (root->expr, 1))))
        {
          tree rt = root->type;
+         gcc_assert ((root->offset % BITS_PER_UNIT) == 0
+                     && (root->size % BITS_PER_UNIT) == 0);
          root->type = build_nonstandard_integer_type (root->size,
                                                       TYPE_UNSIGNED (rt));
          root->expr = build_ref_for_offset (UNKNOWN_LOCATION,


can you verify that, thus give it a bootstrap & regtest run?


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2012-05-22 12:41 ` rguenth at gcc dot gnu.org
@ 2012-05-22 13:19 ` wschmidt at gcc dot gnu.org
  2012-05-22 18:22 ` wschmidt at gcc dot gnu.org
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-22 13:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #7 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-22 13:13:04 UTC ---
Yep, I'll check it out.  Thanks, Richard!


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2012-05-22 13:19 ` wschmidt at gcc dot gnu.org
@ 2012-05-22 18:22 ` wschmidt at gcc dot gnu.org
  2012-05-23  7:15 ` rguenther at suse dot de
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-22 18:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #8 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-22 18:04:21 UTC ---
Richard, the patch looks good.  It fixed the reduced test case, solves the
customer problem, and bootstraps on powerpc64-linux with no regressions.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2012-05-22 18:22 ` wschmidt at gcc dot gnu.org
@ 2012-05-23  7:15 ` rguenther at suse dot de
  2012-05-23 12:36 ` wschmidt at gcc dot gnu.org
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenther at suse dot de @ 2012-05-23  7:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #9 from rguenther at suse dot de <rguenther at suse dot de> 2012-05-23 07:04:51 UTC ---
On Tue, 22 May 2012, wschmidt at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438
> 
> --- Comment #8 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-22 18:04:21 UTC ---
> Richard, the patch looks good.  It fixed the reduced test case, solves the
> customer problem, and bootstraps on powerpc64-linux with no regressions.

It's going to take me a few days until I can get to this, so, can you
install the patch on trunk with a suitable ChangeLog entry?  I'll take
care of backporting it then in a few days.

Thx.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2012-05-23  7:15 ` rguenther at suse dot de
@ 2012-05-23 12:36 ` wschmidt at gcc dot gnu.org
  2012-05-23 13:10 ` rguenther at suse dot de
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-23 12:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #10 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-23 12:35:11 UTC ---
Sure.  My testing was on 4.7, so I'll sanity-test trunk first.  I can commit
the backport next week also, assuming no fallout between now and then.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2012-05-23 12:36 ` wschmidt at gcc dot gnu.org
@ 2012-05-23 13:10 ` rguenther at suse dot de
  2012-05-23 17:48 ` wschmidt at gcc dot gnu.org
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenther at suse dot de @ 2012-05-23 13:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> 2012-05-23 12:39:31 UTC ---
On Wed, 23 May 2012, wschmidt at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438
> 
> --- Comment #10 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-23 12:35:11 UTC ---
> Sure.  My testing was on 4.7, so I'll sanity-test trunk first.  I can commit
> the backport next week also, assuming no fallout between now and then.

Thanks.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2012-05-23 13:10 ` rguenther at suse dot de
@ 2012-05-23 17:48 ` wschmidt at gcc dot gnu.org
  2012-05-25 15:38 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-23 17:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #12 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-23 17:38:44 UTC ---
Hm, the auto-commenter isn't working.  Committed to trunk:

2012-05-23  Richard Guenther  <rguenther@suse.de>

    PR tree-optimization/53438
    * tree-sra.c (analyze_access_subtree): Correct bitfield exclusion.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2012-05-23 17:48 ` wschmidt at gcc dot gnu.org
@ 2012-05-25 15:38 ` jakub at gcc dot gnu.org
  2012-05-25 15:49 ` wschmidt at gcc dot gnu.org
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-25 15:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-25 15:13:50 UTC ---
It didn't work because you've used the patch as svn commit message instead of
ChangeLog entry.
Anyway, would it be possible to have a testcase for the gcc testsuite too?


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2012-05-25 15:38 ` jakub at gcc dot gnu.org
@ 2012-05-25 15:49 ` wschmidt at gcc dot gnu.org
  2012-05-28 14:03 ` wschmidt at gcc dot gnu.org
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-25 15:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #14 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-25 15:37:27 UTC ---
(In reply to comment #13)
> It didn't work because you've used the patch as svn commit message instead of
> ChangeLog entry.

Whoops, found a new kind of mistake to make. :)

> Anyway, would it be possible to have a testcase for the gcc testsuite too?

I've been trying, but so far haven't been able to come up with anything other
than the enormous "reduced" testcase.  Seems it may require a combination of
templates and inlining to get the bitfield access in the right form to exhibit
the bug, but I haven't figured it out yet.  Ideas welcome.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2012-05-25 15:49 ` wschmidt at gcc dot gnu.org
@ 2012-05-28 14:03 ` wschmidt at gcc dot gnu.org
  2012-05-28 14:09 ` wschmidt at gcc dot gnu.org
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-28 14:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #15 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-28 13:58:30 UTC ---
Author: wschmidt
Date: Mon May 28 13:58:18 2012
New Revision: 187930

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187930
Log:
2012-05-28  Bill Schmidt  <wschmidt@linux.ibm.com>

    Backport from mainline
        2012-05-23  Richard Guenther  <rguenther@suse.de>

    PR tree-optimization/53438
    * tree-sra.c (analyze_access_subtree): Correct bitfield exclusion.

Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/tree-sra.c


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2012-05-28 14:03 ` wschmidt at gcc dot gnu.org
@ 2012-05-28 14:09 ` wschmidt at gcc dot gnu.org
  2012-05-28 14:28 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-28 14:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

William J. Schmidt <wschmidt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #16 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-28 14:02:12 UTC ---
Fixed.  Thanks, Richard!


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2012-05-28 14:09 ` wschmidt at gcc dot gnu.org
@ 2012-05-28 14:28 ` jakub at gcc dot gnu.org
  2012-05-28 14:48 ` jakub at gcc dot gnu.org
  2012-05-28 23:07 ` wschmidt at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-28 14:28 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rockeet at gmail dot com

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-28 14:09:05 UTC ---
*** Bug 53505 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2012-05-28 14:28 ` jakub at gcc dot gnu.org
@ 2012-05-28 14:48 ` jakub at gcc dot gnu.org
  2012-05-28 23:07 ` wschmidt at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-28 14:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-28 14:34:30 UTC ---
(In reply to comment #14)
> > Anyway, would it be possible to have a testcase for the gcc testsuite too?
> 
> I've been trying, but so far haven't been able to come up with anything other
> than the enormous "reduced" testcase.  Seems it may require a combination of
> templates and inlining to get the bitfield access in the right form to exhibit
> the bug, but I haven't figured it out yet.  Ideas welcome.

Ok, we now have a testcase in the testsuite from the dup PR:
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187931
(and r187932 for 4.7).


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug tree-optimization/53438] [4.7/4.8 Regression] Bitfield store replaced with full-byte store
  2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  2012-05-28 14:48 ` jakub at gcc dot gnu.org
@ 2012-05-28 23:07 ` wschmidt at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2012-05-28 23:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53438

--- Comment #19 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-05-28 22:31:40 UTC ---
Excellent.  Thanks, Jakub.


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-05-28 22:33 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-21 15:23 [Bug tree-optimization/53438] New: [4.7 Regression] Bitfield store replaced with full-byte store wschmidt at gcc dot gnu.org
2012-05-21 15:19 ` [Bug tree-optimization/53438] " wschmidt at gcc dot gnu.org
2012-05-21 15:22 ` wschmidt at gcc dot gnu.org
2012-05-22  5:35 ` [Bug tree-optimization/53438] [4.7/4.8 " pinskia at gcc dot gnu.org
2012-05-22  5:36 ` pinskia at gcc dot gnu.org
2012-05-22  7:18 ` pinskia at gcc dot gnu.org
2012-05-22 10:03 ` rguenth at gcc dot gnu.org
2012-05-22 10:50 ` rguenth at gcc dot gnu.org
2012-05-22 12:41 ` rguenth at gcc dot gnu.org
2012-05-22 13:19 ` wschmidt at gcc dot gnu.org
2012-05-22 18:22 ` wschmidt at gcc dot gnu.org
2012-05-23  7:15 ` rguenther at suse dot de
2012-05-23 12:36 ` wschmidt at gcc dot gnu.org
2012-05-23 13:10 ` rguenther at suse dot de
2012-05-23 17:48 ` wschmidt at gcc dot gnu.org
2012-05-25 15:38 ` jakub at gcc dot gnu.org
2012-05-25 15:49 ` wschmidt at gcc dot gnu.org
2012-05-28 14:03 ` wschmidt at gcc dot gnu.org
2012-05-28 14:09 ` wschmidt at gcc dot gnu.org
2012-05-28 14:28 ` jakub at gcc dot gnu.org
2012-05-28 14:48 ` jakub at gcc dot gnu.org
2012-05-28 23:07 ` wschmidt at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).