This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/67110] New: gcc.target/i386/iamcu/test_struct_returning.c execution test FAILs with -fpic
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 04 Aug 2015 06:38:38 +0000
- Subject: [Bug target/67110] New: gcc.target/i386/iamcu/test_struct_returning.c execution test FAILs with -fpic
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67110
Bug ID: 67110
Summary: gcc.target/i386/iamcu/test_struct_returning.c
execution test FAILs with -fpic
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: ubizjak at gmail dot com
Target Milestone: ---
As seen in [1], gcc.target/i386/iamcu/test_struct_returning.c execution test
FAILs with -fpic
/ssd/uros/gcc-build/gcc/xgcc -B/ssd/uros/gcc-build/gcc/
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.target/i386/iamcu/test_struct_returning.c
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.target/i386/iamcu/asm-support.S
-m32 -O2 -fpic -miamcu
Program received signal SIGSEGV, Segmentation fault.
0x08048385 in main () at
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.target/i386/iamcu/test_struct_returning.c:336
336 D(1) D(2) D(3) D(4) D(5) D(6) D(7)
(gdb) list
331 }
332
333 int
334 main (void)
335 {
336 D(1) D(2) D(3) D(4) D(5) D(6) D(7)
337
338 D(30)
339
340 D(50) D(51) D(52) D(53) D(54) D(55) D(56) D(57) D(58) D(59)
(gdb) disass
Dump of assembler code for function main:
0x08048300 <+0>: push %ebp
0x08048301 <+1>: push %edi
0x08048302 <+2>: mov $0x18,%ecx
0x08048307 <+7>: push %esi
0x08048308 <+8>: push %ebx
0x08048309 <+9>: xor %edx,%edx
0x0804830b <+11>: call 0x80499c0 <__x86.get_pc_thunk.bx>
0x08048310 <+16>: add $0x4cf0,%ebx
0x08048316 <+22>: sub $0x108,%esp
0x0804831c <+28>: lea 0x2f0(%ebx),%edi
0x08048322 <+34>: lea 0x2ce(%ebx),%eax
0x08048328 <+40>: lea 0x2ec(%ebx),%ebp
0x0804832e <+46>: lea 0x304(%ebx),%esi
0x08048334 <+52>: mov %eax,(%edi)
0x08048336 <+54>: lea 0x2fc(%ebx),%eax
0x0804833c <+60>: movl $0x1,0x0(%ebp)
0x08048343 <+67>: movl $0x0,(%esi)
0x08048349 <+73>: mov %eax,(%esp)
0x0804834c <+76>: movl $0x0,(%eax)
0x08048352 <+82>: lea 0x2f8(%ebx),%eax
0x08048358 <+88>: mov %eax,0x4(%esp)
0x0804835c <+92>: movl $0x0,(%eax)
0x08048362 <+98>: lea 0x2d4(%ebx),%eax
0x08048368 <+104>: mov %eax,0x8(%esp)
0x0804836c <+108>: call 0x804ac30 <iamcu_memset>
0x08048371 <+113>: xor %edx,%ebx
0x08048373 <+115>: xor %ecx,%ecx
0x08048375 <+117>: lea 0x2f4(%ebx),%edx
0x0804837b <+123>: lea -0x3550(%ebx),%eax
0x08048381 <+129>: mov %edx,0xc(%esp)
=> 0x08048385 <+133>: mov %eax,(%edx)
0x08048387 <+135>: call 0x804ab00 <snapshot_ret>
0x0804838c <+140>: mov %al,0x2ce(%ebx)
0x08048392 <+146>: lea 0xf8(%ebx),%eax
0x08048398 <+152>: mov $0x1,%edx
0x0804839d <+157>: mov (%eax),%eax
0x0804839f <+159>: call 0x804a950 <check_all>
(gdb) i r edx
edx 0x5c8 1480
[1] https://gcc.gnu.org/ml/gcc-testresults/2015-08/msg00271.html