public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/13949] New: illigal code
@ 2004-01-31 15:30 ysato at users dot sourceforge dot jp
2004-01-31 17:19 ` [Bug target/13949] " kazu at cs dot umass dot edu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: ysato at users dot sourceforge dot jp @ 2004-01-31 15:30 UTC (permalink / raw)
To: gcc-bugs
Code corresponding to "nr & 7" is not generate.
It is evaluated as 1UL << nr.
build options -mh -mint32 -O2
- test code -
static inline int test(int nr, void *addr)
{
return ((*((unsigned char *)addr + ((nr >> 3) ^ 3)) & (1UL << (nr & 7))) != 0);
}
int main(void)
{
unsigned long array[10];
int c;
for (c = 0; c < sizeof(array)*8; c++)
if (test(c,array))
break;
}
- output -
.file "test.c"
.h8300h
.section .text
.align 1
.global _main
_main:
mov.l er6,@-er7
mov.l er7,er6
add.l #-40,er7
sub.l er3,er3
mov.l er6,er0
add.l #-40,er0
.L7:
mov.l er3,er2
shar.l er2
shar.l er2
shar.l er2
xor #3,r2l
add.l er0,er2
btst r3l,@er2
bne .L3
adds #1,er3
cmp.l #319,er3
bls .L7
.L3:
add.l #40,er7
mov.l @er7+,er6
rts
.size _main, .-_main
.end
.ident "GCC: (GNU) 3.4.0 20040131 (prerelease)"
--
Summary: illigal code
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ysato at users dot sourceforge dot jp
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: h8300-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13949
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/13949] illigal code
2004-01-31 15:30 [Bug target/13949] New: illigal code ysato at users dot sourceforge dot jp
@ 2004-01-31 17:19 ` kazu at cs dot umass dot edu
2004-01-31 17:21 ` kazu at cs dot umass dot edu
2004-02-01 13:50 ` ysato at users dot sourceforge dot jp
2 siblings, 0 replies; 4+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-01-31 17:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-01-31 17:19 -------
Assigning to me to...
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |kazu at cs dot umass dot edu
AssignedTo|unassigned at gcc dot gnu |kazu at cs dot umass dot edu
|dot org |
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13949
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/13949] illigal code
2004-01-31 15:30 [Bug target/13949] New: illigal code ysato at users dot sourceforge dot jp
2004-01-31 17:19 ` [Bug target/13949] " kazu at cs dot umass dot edu
@ 2004-01-31 17:21 ` kazu at cs dot umass dot edu
2004-02-01 13:50 ` ysato at users dot sourceforge dot jp
2 siblings, 0 replies; 4+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-01-31 17:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-01-31 17:21 -------
btst instruction on H8/300 only uses the lowest three bits to specify
the bit location, so an explicit "& 7" is not needed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13949
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/13949] illigal code
2004-01-31 15:30 [Bug target/13949] New: illigal code ysato at users dot sourceforge dot jp
2004-01-31 17:19 ` [Bug target/13949] " kazu at cs dot umass dot edu
2004-01-31 17:21 ` kazu at cs dot umass dot edu
@ 2004-02-01 13:50 ` ysato at users dot sourceforge dot jp
2 siblings, 0 replies; 4+ messages in thread
From: ysato at users dot sourceforge dot jp @ 2004-02-01 13:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ysato at users dot sourceforge dot jp 2004-02-01 13:50 -------
I'm sorry it was a misunderstanding.
There is not a problem.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |VERIFIED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13949
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-02-01 13:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-31 15:30 [Bug target/13949] New: illigal code ysato at users dot sourceforge dot jp
2004-01-31 17:19 ` [Bug target/13949] " kazu at cs dot umass dot edu
2004-01-31 17:21 ` kazu at cs dot umass dot edu
2004-02-01 13:50 ` ysato at users dot sourceforge dot jp
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).