public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30763] New: problem with bit-fields assignment
@ 2007-02-11 13:17 vovanec at gmail dot com
2007-02-11 13:21 ` [Bug c++/30763] " vovanec at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: vovanec at gmail dot com @ 2007-02-11 13:17 UTC (permalink / raw)
To: gcc-bugs
Test case:
#include <stdio.h>
#define INT_INVALID -1
class Test
{
int b : 16;
int a;
int c : 16;
public:
Test()
{
b = a = c = INT_INVALID;
//a = b = c = INT_INVALID;
}
void dump()const
{
printf("a: %d\tb: %d\tc: %d\n",a,b,c);
}
};
int main()
{
Test a;
a.dump();
return 0;
}
----------------------------
g++-4.1 main.cpp
./a.out
a: 65535 b: -1 c: -1
g++-4.0 main.cpp
a: -1 b: -1 c: -1
It seems like regression in GCC-4.1.1 and 4.1.2(on GCC-4.1.0 and earlier
I've got correct results)
--
Summary: problem with bit-fields assignment
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vovanec at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30763
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/30763] problem with bit-fields assignment
2007-02-11 13:17 [Bug c++/30763] New: problem with bit-fields assignment vovanec at gmail dot com
@ 2007-02-11 13:21 ` vovanec at gmail dot com
2007-02-11 18:21 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: vovanec at gmail dot com @ 2007-02-11 13:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from vovanec at gmail dot com 2007-02-11 13:20 -------
When order of assignment has changed (a = b = c = INT_INVALID;)
test case returns correct values.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30763
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/30763] problem with bit-fields assignment
2007-02-11 13:17 [Bug c++/30763] New: problem with bit-fields assignment vovanec at gmail dot com
2007-02-11 13:21 ` [Bug c++/30763] " vovanec at gmail dot com
2007-02-11 18:21 ` rguenth at gcc dot gnu dot org
@ 2007-02-11 18:21 ` rguenth at gcc dot gnu dot org
2007-02-11 18:27 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-02-11 18:21 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC host triplet|linux-i386 |
Keywords| |wrong-code
Known to work| |4.1.0
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30763
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/30763] problem with bit-fields assignment
2007-02-11 13:17 [Bug c++/30763] New: problem with bit-fields assignment vovanec at gmail dot com
2007-02-11 13:21 ` [Bug c++/30763] " vovanec at gmail dot com
@ 2007-02-11 18:21 ` rguenth at gcc dot gnu dot org
2007-02-11 18:21 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-02-11 18:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-02-11 18:20 -------
Confirmed, but I remember seeing this elsewhere so it must be a dup.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-02-11 18:20:58
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30763
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/30763] problem with bit-fields assignment
2007-02-11 13:17 [Bug c++/30763] New: problem with bit-fields assignment vovanec at gmail dot com
` (2 preceding siblings ...)
2007-02-11 18:21 ` rguenth at gcc dot gnu dot org
@ 2007-02-11 18:27 ` pinskia at gcc dot gnu dot org
2007-12-11 13:50 ` [Bug c++/30763] [4.1 Regression] " rguenth at gcc dot gnu dot org
2008-07-04 15:58 ` jsm28 at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-11 18:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-02-11 18:27 -------
This works for me in 4.3.0:
.[pinskia-laptop:gcc/objdir-noboot/gcc] pinskia% ./a.out
a: -1 b: -1 c: -1
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|4.1.0 |4.3.0
Target Milestone|4.1.2 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30763
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/30763] [4.1 Regression] problem with bit-fields assignment
2007-02-11 13:17 [Bug c++/30763] New: problem with bit-fields assignment vovanec at gmail dot com
` (3 preceding siblings ...)
2007-02-11 18:27 ` pinskia at gcc dot gnu dot org
@ 2007-12-11 13:50 ` rguenth at gcc dot gnu dot org
2008-07-04 15:58 ` jsm28 at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-12-11 13:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2007-12-11 13:50 -------
And 4.2.2 and 4.0.4.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.1.2
Known to work|4.3.0 |4.0.4 4.2.2 4.3.0
Summary|problem with bit-fields |[4.1 Regression] problem
|assignment |with bit-fields assignment
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30763
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/30763] [4.1 Regression] problem with bit-fields assignment
2007-02-11 13:17 [Bug c++/30763] New: problem with bit-fields assignment vovanec at gmail dot com
` (4 preceding siblings ...)
2007-12-11 13:50 ` [Bug c++/30763] [4.1 Regression] " rguenth at gcc dot gnu dot org
@ 2008-07-04 15:58 ` jsm28 at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 15:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jsm28 at gcc dot gnu dot org 2008-07-04 15:57 -------
Closing 4.1 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to fail|4.1.2 |4.1.2 4.1.3
Resolution| |FIXED
Target Milestone|4.1.3 |4.2.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30763
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-04 15:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-11 13:17 [Bug c++/30763] New: problem with bit-fields assignment vovanec at gmail dot com
2007-02-11 13:21 ` [Bug c++/30763] " vovanec at gmail dot com
2007-02-11 18:21 ` rguenth at gcc dot gnu dot org
2007-02-11 18:21 ` rguenth at gcc dot gnu dot org
2007-02-11 18:27 ` pinskia at gcc dot gnu dot org
2007-12-11 13:50 ` [Bug c++/30763] [4.1 Regression] " rguenth at gcc dot gnu dot org
2008-07-04 15:58 ` jsm28 at gcc dot gnu dot 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).