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



--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> 2012-11-27 
23:43:34 UTC ---

bash-3.2$ /opt/gnu64/bin/gdb nullptr28.exe

GNU gdb (GDB) 7.4.50.20120203-cvs

Copyright (C) 2012 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "hppa64-hp-hpux11.11".

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>...

Reading symbols from

/mnt/gnu/gcc/objdir-test/gcc/testsuite/g++/nullptr28.exe...done.

(gdb) r

Starting program: /mnt/gnu/gcc/objdir-test/gcc/testsuite/g++/nullptr28.exe 

warning: Private mapping of shared library text was not specified

by the executable; setting a breakpoint in a shared library which

is not privately mapped will not work.  See the HP-UX 11i v3 chatr

manpage for methods to privately map shared library text.



Program received signal SIGBUS, Bus error.

0x4000000000002a7c in g() ()

(gdb) disass $pc-16,$pc+16

Dump of assembler code from 0x4000000000002a6c to 0x4000000000002a8c:

   0x4000000000002a6c <_Z1gv+28>:    copy dp,r4

   0x4000000000002a70 <_Z1gv+32>:    b,l 0x40000000000029f8 <_Z1fv>,rp

   0x4000000000002a74 <_Z1gv+36>:    nop

   0x4000000000002a78 <_Z1gv+40>:    copy r4,dp

=> 0x4000000000002a7c <_Z1gv+44>:    ldd 0(ret0),ret0

   0x4000000000002a80 <_Z1gv+48>:    ldd -10(r3),rp

   0x4000000000002a84 <_Z1gv+52>:    ldd 8(r3),r4

   0x4000000000002a88 <_Z1gv+56>:    ldo 40(r3),sp

End of assembler dump.

(gdb) p/x $ret0

$1 = 0x800000010000031c

(gdb) info addr n

Symbol "n" is at 0x800000010000031c in a file compiled without debugging.



Symbol "n" is incorrectly aligned.



In nullptr28.C.231r.dfinish:



(insn 9 41 19 (set (reg:DI 28 %r28 [orig:69 D.1635 ] [69])

        (mem:DI (reg/f:DI 28 %r28 [orig:68 D.1636 ] [68]) [0 *D.1636_1+0 S8

A8])) /mnt/gnu/gcc/gcc/gcc/testsuite/g++.dg/cpp0x/nullptr28.C:10 120

{*pa.md:4109}

     (nil))



So, the RTL thinks "n" should be aligned.  However, in the .s file, we have:



        .LEVEL 2.0w

        .globl  i

        .section        .bss

        .align 4

        .type   i, @object

        .size   i, 4

        .align 4

i:

        .block 4

        .globl  n

        .align 1

        .type   n, @object

        .size   n, 8

        .align 1

n:

        .block 8

        .text

Reply via email to