This is the mail archive of the gcc-help@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]

Re: Openmp sections


I have changed the code to

#pragma omp parallel sections 

But now I get an SIGILL.

Here is the console log:

-bash-3.00$ LANG=C gdb ./a.out
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...
Using host libthread_db library "/lib64/tls/libthread_db.so.1".
(gdb) run
Starting program: /lfs/user/bartosch/cg/a.out
[Thread debugging using libthread_db enabled]
[New Thread 182898459584 (LWP 16540)]
1
8
[New Thread 1084229984 (LWP 16543)]
[New Thread 1094719840 (LWP 16544)]
[New Thread 1105209696 (LWP 16545)]
[New Thread 1115699552 (LWP 16546)]
[New Thread 1126189408 (LWP 16547)]
[New Thread 1136679264 (LWP 16548)]
[New Thread 1147169120 (LWP 16549)]

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 1094719840 (LWP 16544)]
0x0000000000400a93 in main.omp_fn.0 (.omp_data_i=0x0) at ga.C:10
10      #pragma omp parallel sections
(gdb) where
#0  0x0000000000400a93 in main.omp_fn.0 (.omp_data_i=0x0) at ga.C:10
#1  0x0000002a9555b635 in gomp_thread_start (xdata=<value optimized out>) 
at ../../../gcc-4.3.0/libgomp/team.c:108
#2  0x0000003e90c0610a in start_thread () from /lib64/tls/libpthread.so.0
#3  0x0000003e8fdc68c3 in clone () from /lib64/tls/libc.so.6
#4  0x0000000000000000 in ?? ()
(gdb) wherei
Undefined command: "wherei".  Try "help".
(gdb) disassemble
Dump of assembler code for function main.omp_fn.0:
0x0000000000400a6e <main.omp_fn.0+0>:   push   %rbp
0x0000000000400a6f <main.omp_fn.0+1>:   mov    %rsp,%rbp
0x0000000000400a72 <main.omp_fn.0+4>:   sub    $0x20,%rsp
0x0000000000400a76 <main.omp_fn.0+8>:   mov    %rdi,0xffffffffffffffe8(%rbp)
0x0000000000400a7a <main.omp_fn.0+12>:  mov    $0x2,%edi
0x0000000000400a7f <main.omp_fn.0+17>:  callq  0x400900 
<GOMP_sections_start@plt>
0x0000000000400a84 <main.omp_fn.0+22>:  mov    %eax,0xffffffffffffffe4(%rbp)
0x0000000000400a87 <main.omp_fn.0+25>:  cmpl   $0x1,0xffffffffffffffe4(%rbp)
0x0000000000400a8b <main.omp_fn.0+29>:  je     0x400aa2 <main.omp_fn.0+52>
0x0000000000400a8d <main.omp_fn.0+31>:  cmpl   $0x2,0xffffffffffffffe4(%rbp)
0x0000000000400a91 <main.omp_fn.0+35>:  je     0x400a95 <main.omp_fn.0+39>
0x0000000000400a93 <main.omp_fn.0+37>:  ud2a
0x0000000000400a95 <main.omp_fn.0+39>:  movl   $0x0,0xfffffffffffffff8(%rbp)
0x0000000000400a9c <main.omp_fn.0+46>:  addl   $0x1,0xfffffffffffffff8(%rbp)
0x0000000000400aa0 <main.omp_fn.0+50>:  jmp    0x400a9c <main.omp_fn.0+46>
0x0000000000400aa2 <main.omp_fn.0+52>:  movl   $0x0,0xfffffffffffffffc(%rbp)
0x0000000000400aa9 <main.omp_fn.0+59>:  addl   $0x1,0xfffffffffffffffc(%rbp)
0x0000000000400aad <main.omp_fn.0+63>:  jmp    0x400aa9 <main.omp_fn.0+59>
End of assembler dump.
(gdb)  


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