[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug c/58943] wrong calculation of indirect structure member arithmetic via function call
From:       "mikpelinux at gmail dot com" <gcc-bugzilla () gcc ! gnu ! org>
Date:       2013-10-31 20:51:35
Message-ID: bug-58943-4-UNIMCEL72k () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

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

Mikael Pettersson <mikpelinux at gmail dot com> changed:

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

--- Comment #1 from Mikael Pettersson <mikpelinux at gmail dot com> ---
Created attachment 31127
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31127&action=edit
reduced test case

I believe this bug is real, and a dup or variation of PR48814, the difference
being that PR48814 had a postfix ++ while here we have a compound assignment
(|=).  According to Joseph's comment in
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48814#c8> the same interleaving
restrictions apply to ++ and |=.

The bug appears to trigger when the lvalue is a non-scalar.  It doesn't have to
be a struct member, an array element (as in this test case) suffices.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic