This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/30826] New: alignment error when optimizing with inlining


Attached test program dumps core when built with optimization using gcc-4.1.1
on ia64-hp-hpux11.23.

It works without optimization, or when using "-O1 -fno-inline".

It is same both with HP's gcc-4.1.1 as well with self-built gcc-4.1.1, both
using GNU as.

$ /opt/hp-gcc-4.1.1/bin/gcc -v
Using built-in specs.
Target: ia64-hp-hpux11.23
Configured with: /tmp/gcc-4.1.1.tar.gz/gcc-4.1.1/configure
--host=ia64-hp-hpux11.23 --target=ia64-hp-hpux11.23 --build=ia64-hp-hpux11.23
--prefix=/opt/hp-gcc-4.1.1 --enable-languages=c,c++ --with-gnu-as
--without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix
Thread model: posix
gcc version 4.1.1

$ /opt/hp-gcc-4.1.1/bin/gcc inline.c
$ ./a.out

$ /opt/hp-gcc-4.1.1/bin/gcc inline.c -O1
$ ./a.out
Bus error (core dumped)

$ /opt/langtools/bin/gdb a.out
HP gdb 5.6.0 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.6.0 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..(no debugging symbols found)...
(gdb) r
Starting program: /mnt/big/logins/haubi/a.out 
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...
Program received signal SIGBUS, Bus error
  si_code: 1 - BUS_ADRALN - Invalid address alignment.
0x200000007edb4130:0 in mallinfo+0x180 () from /usr/lib/hpux32/libc.so.1
(gdb) bt
#0  0x200000007edb4130:0 in mallinfo+0x180 () from /usr/lib/hpux32/libc.so.1
#1  0x40008b0:0 in main+0x30 ()
(gdb)


-- 
           Summary: alignment error when optimizing with inlining
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: michael dot haubenwallner at salomon dot at
 GCC build triplet: ia64-hp-hpux11.23
  GCC host triplet: ia64-hp-hpux11.23
GCC target triplet: ia64-hp-hpux11.23


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]