public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/44903]  New: FAIL: gcc.dg/pr35258.c execution test
@ 2010-07-10 15:17 danglin at gcc dot gnu dot org
  2010-07-10 19:46 ` [Bug tree-optimization/44903] [4.6 Regression] " danglin at gcc dot gnu dot org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: danglin at gcc dot gnu dot org @ 2010-07-10 15:17 UTC (permalink / raw)
  To: gcc-bugs

Wrong code is generated causing bus error in test(gdb):

(gdb) r
Program received signal SIGBUS, Bus error.
0x00002b48 in bar ()
(gdb) disass
Dump of assembler code for function bar:
   0x00002b40 <+0>:     addil L%-800,dp,r1
   0x00002b44 <+4>:     ldo 780(r1),r1
=> 0x00002b48 <+8>:     ldw 1(r1),ret0
   0x00002b4c <+12>:    extrw,u ret0,15,16,r19
   0x00002b50 <+16>:    sth r19,2(r1)
   0x00002b54 <+20>:    sth ret0,4(r1)
   0x00002b58 <+24>:    ldi 2e,ret0
   0x00002b5c <+28>:    bv r0(rp)
   0x00002b60 <+32>:    stb ret0,1(r1)

Register r1 points to str which has 4-byte alignment.  So,
the memory address for the ldw instruction is misaligned.

The test would also fail on linux if the unaligned handler
was disabled.

We have the following for function bar after coalescing:

bar ()
{
  unsigned int D.1980;

  # BLOCK 2 freq:10000
  # PRED: ENTRY [100.0%]  (fallthru,exec)
  D.1980_3 = MEM[(char * {ref-all})&str + 1B];
  MEM[(char * {ref-all})&str + 2B] = D.1980_3;
  str[1] = 46;
  return;
  # SUCC: EXIT [100.0%] 

}


-- 
           Summary: FAIL: gcc.dg/pr35258.c execution test
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa*-*-hpux*
  GCC host triplet: hppa*-*-hpux*
GCC target triplet: hppa*-*-hpux*


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


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

end of thread, other threads:[~2010-07-28 10:33 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-10 15:17 [Bug tree-optimization/44903] New: FAIL: gcc.dg/pr35258.c execution test danglin at gcc dot gnu dot org
2010-07-10 19:46 ` [Bug tree-optimization/44903] [4.6 Regression] " danglin at gcc dot gnu dot org
2010-07-10 21:29 ` [Bug target/44903] " rguenth at gcc dot gnu dot org
2010-07-10 23:35 ` dave at hiauly1 dot hia dot nrc dot ca
2010-07-11 10:47 ` rguenth at gcc dot gnu dot org
2010-07-11 15:17 ` dave at hiauly1 dot hia dot nrc dot ca
2010-07-11 16:24 ` rguenth at gcc dot gnu dot org
2010-07-11 16:33 ` danglin at gcc dot gnu dot org
2010-07-11 16:55 ` dave at hiauly1 dot hia dot nrc dot ca
2010-07-11 22:04 ` rguenth at gcc dot gnu dot org
2010-07-11 22:22 ` dave at hiauly1 dot hia dot nrc dot ca
2010-07-11 22:37 ` rguenth at gcc dot gnu dot org
2010-07-13 13:53 ` rguenth at gcc dot gnu dot org
2010-07-13 17:41 ` mikpe at it dot uu dot se
2010-07-14  0:19 ` danglin at gcc dot gnu dot org
2010-07-23 12:14 ` rguenth at gcc dot gnu dot org
2010-07-26 12:22 ` rguenth at gcc dot gnu dot org
2010-07-26 12:45 ` rguenth at gcc dot gnu dot org
2010-07-26 12:46 ` rguenth at gcc dot gnu dot org
2010-07-28  0:22 ` dave at hiauly1 dot hia dot nrc dot ca
2010-07-28 10:33 ` rguenth at gcc dot gnu dot org
2010-07-28 10:33 ` rguenth 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).