public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/38283]  New: FAIL: libgomp.fortran/pr25162.f
@ 2008-11-27  2:30 danglin at gcc dot gnu dot org
  2008-11-27  4:09 ` [Bug libgomp/38283] " danglin at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-11-27  2:30 UTC (permalink / raw)
  To: gcc-bugs

Executing on host: /test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/
/te
st/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/pr25162.f 
-B/test/gnu/gcc/objd
ir/hppa2.0w-hp-hpux11.11/./libgomp/
-I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11
/./libgomp -I/test/gnu/gcc/gcc/libgomp/testsuite/.. -fmessage-length=0 -fopenmp 
 -O0     -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/.libs -lgomp
-L/
test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/../libgfortran/.libs
-lgfort
ranbegin -lgfortran -lm   -o ./pr25162.exe    (timeout = 300)
PASS: libgomp.fortran/pr25162.f  -O0  (test for excess errors)
Setting LD_LIBRARY_PATH to
.:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgom
p/.libs:/test/gnu/gcc/objdir/gcc:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./li
bgomp/../libgfortran/.libs:.:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgom
p/.libs:/test/gnu/gcc/objdir/gcc:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./li
bgomp/../libgfortran/.libs
FAIL: libgomp.fortran/pr25162.f  -O0  execution test

Fails at all optimizations.

(gdb) r
Starting program:
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libgomp/testsuite/pr25162.xg 
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.
[New process 21031, lwp 174348]
[process 21031, lwp 174348 exited]
[New process 21031, lwp 174349]
[process 21031, lwp 174349 exited]
[New process 21031, lwp 174350]
[process 21031, lwp 174350 exited]
[New process 21031, lwp 174351]
[process 21031, lwp 174351 exited]

Program received signal SIGBUS, Bus error.
0x00002eec in test1_ ()
    at /test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/pr25162.f:14
14               BPRIM( I ) = DBLE( I )
Current language:  auto; currently fortran
(gdb) bt
#0  0x00002eec in test1_ ()
    at /test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/pr25162.f:14
#1  0x00002e48 in MAIN__ ()
    at /test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/pr25162.f:5
#2  0x00003278 in main (argc=1, argv=0x0)
    at ../../../gcc/libgfortran/fmain.c:21
(gdb) disass 0x00002edc 0x00002efc
Dump of assembler code from 0x2edc to 0x2efc:
0x00002edc <test1_+100>:        nop
0x00002ee0 <test1_+104>:        copy ret0,r19
0x00002ee4 <test1_+108>:        depw,z r4,28,29,ret0
0x00002ee8 <test1_+112>:        add,l ret0,r19,ret0
0x00002eec <test1_+116>:        fstd fr12,0(ret0)
0x00002ef0 <test1_+120>:        ldw 8(r3),r19
0x00002ef4 <test1_+124>:        ldi 64,ret0
0x00002ef8 <test1_+128>:        cmpclr,<> ret0,r19,ret0
End of assembler dump.
(gdb) p/x $ret0
$1 = 0x4000f494

The address is aligned to a 4-byte boundary for an 8-byte store.  This
address is returned by the call to __emutls_get_address.


-- 
           Summary: FAIL: libgomp.fortran/pr25162.f
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa2.0w-hp-hpux11.11
  GCC host triplet: hppa2.0w-hp-hpux11.11
GCC target triplet: hppa2.0w-hp-hpux11.11


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


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

* [Bug libgomp/38283] FAIL: libgomp.fortran/pr25162.f
  2008-11-27  2:30 [Bug libgomp/38283] New: FAIL: libgomp.fortran/pr25162.f danglin at gcc dot gnu dot org
@ 2008-11-27  4:09 ` danglin at gcc dot gnu dot org
  2008-11-27  4:14 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-11-27  4:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from danglin at gcc dot gnu dot org  2008-11-27 04:08 -------
emutls_alloc is called with the following struct __emutls_object *:

(gdb) 
emutls_alloc (obj=0x400011d0) at ../../../gcc/libgcc/../gcc/emutls.c:95
95      {
(gdb) p/x $r26
$7 = 0x400011d0
(gdb) p *(struct __emutls_object *) $r26
$8 = {size = 0, align = 0, loc = {offset = 2, ptr = 0x2}, templ = 0x0}

As a result, this code is executed in emutls_alloc:

  /* We could use here posix_memalign if available and adjust
     emutls_destroy accordingly.  */
  if (obj->align <= sizeof (void *))
    {
      ptr = malloc (obj->size + sizeof (void *));
      if (ptr == NULL)
        abort ();
      ((void **) ptr)[0] = ptr;
      ret = ptr + sizeof (void *);
    }

This causes the unaligned pointer.

(gdb) bt
#0  emutls_alloc (obj=0x400011d0) at ../../../gcc/libgcc/../gcc/emutls.c:104
#1  0x7ad79a04 in __emutls_get_address (obj=0x400011d0)
    at ../../../gcc/libgcc/../gcc/emutls.c:180
#2  0x00002ee0 in test1_ ()
    at /test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/pr25162.f:14
#3  0x00002e48 in MAIN__ ()
    at /test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/pr25162.f:5
#4  0x00003278 in main (argc=1, argv=0xf100000)
    at ../../../gcc/libgfortran/fmain.c:21

As far as I can see, the obj passed to __emutls_get_address is never
initialized.  The call assembler is:

        addil LR'__emutls_v.testcom_-$global$,%r27
        copy %r1,%r28
        ldo RR'__emutls_v.testcom_-$global$(%r28),%r26
        .CALL ARGW0=GR
        bl __emutls_get_address,%r2
        nop

__emutls_v.testcom_ is allocated in the $BSS$ subspace:

        .SPACE $PRIVATE$
        .SUBSPA $BSS$

__emutls_v.testcom_     .comm 16

This is a regression, at least a testcase regression, because the tls tests
were previously skipped on this target.


-- 


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


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

* [Bug libgomp/38283] FAIL: libgomp.fortran/pr25162.f
  2008-11-27  2:30 [Bug libgomp/38283] New: FAIL: libgomp.fortran/pr25162.f danglin at gcc dot gnu dot org
  2008-11-27  4:09 ` [Bug libgomp/38283] " danglin at gcc dot gnu dot org
@ 2008-11-27  4:14 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-11-27 23:50 ` [Bug middle-end/38283] " danglin at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2008-11-27  4:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dave at hiauly1 dot hia dot nrc dot ca  2008-11-27 04:13 -------
Subject: Re:  FAIL: libgomp.fortran/pr25162.f

Attached full .s file.

Dave


------- Comment #3 from dave at hiauly1 dot hia dot nrc dot ca  2008-11-27 04:13 -------
Created an attachment (id=16781)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16781&action=view)


-- 


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


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

* [Bug middle-end/38283] FAIL: libgomp.fortran/pr25162.f
  2008-11-27  2:30 [Bug libgomp/38283] New: FAIL: libgomp.fortran/pr25162.f danglin at gcc dot gnu dot org
  2008-11-27  4:09 ` [Bug libgomp/38283] " danglin at gcc dot gnu dot org
  2008-11-27  4:14 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2008-11-27 23:50 ` danglin at gcc dot gnu dot org
  2008-11-28  3:37 ` danglin at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-11-27 23:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from danglin at gcc dot gnu dot org  2008-11-27 23:49 -------
Size of __emutls_v.testcom_ block is wrong, as well as generated code.


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libgomp                     |middle-end


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


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

* [Bug middle-end/38283] FAIL: libgomp.fortran/pr25162.f
  2008-11-27  2:30 [Bug libgomp/38283] New: FAIL: libgomp.fortran/pr25162.f danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-11-27 23:50 ` [Bug middle-end/38283] " danglin at gcc dot gnu dot org
@ 2008-11-28  3:37 ` danglin at gcc dot gnu dot org
  2008-11-28  4:45 ` danglin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-11-28  3:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from danglin at gcc dot gnu dot org  2008-11-28 03:35 -------
(gdb) p debug_tree ($r26)
 <var_decl 7af33e18 __emutls_v.testcom_
    type <record_type 7af7ec30 __emutls_object BLK
        size <integer_cst 7af2b760 constant 128>
        unit size <integer_cst 7af2b780 constant 16>
        align 32 symtab 0 alias set -1 canonical type 7af7ec30
        fields <field_decl 7af78480 __size type <integer_type 7af35340
character(kind=4)>
            unsigned SI file
/test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/pr25162.f line 14 col 0
            size <integer_cst 7af2b520 constant 32>
            unit size <integer_cst 7af2b2c0 constant 4>
            align 32 offset_align 64
            offset <integer_cst 7af2b2e0 constant 0>
            bit offset <integer_cst 7af2b860 constant 0> context <record_type
7af7ec30 __emutls_object> chain <field_decl 7af78420 __align>>>
    addressable asm_written public static ignored common BLK file
/test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/pr25162.f line 14 col 0
size <integer_cst 7af2b760 128> unit size <integer_cst 7af2b780 16>
    align 32 context <function_decl 7af7b400 test1>
    (mem/s/c:BLK (symbol_ref:SI ("__emutls_v.testcom_") [flags 0x200] <var_decl
7af33e18 __emutls_v.testcom_>) [0 __emutls_v.testcom_+0 S16 A32])>


-- 


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


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

* [Bug middle-end/38283] FAIL: libgomp.fortran/pr25162.f
  2008-11-27  2:30 [Bug libgomp/38283] New: FAIL: libgomp.fortran/pr25162.f danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-11-28  3:37 ` danglin at gcc dot gnu dot org
@ 2008-11-28  4:45 ` danglin at gcc dot gnu dot org
  2008-11-30 16:38 ` danglin at gcc dot gnu dot org
  2008-11-30 16:44 ` danglin at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-11-28  4:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from danglin at gcc dot gnu dot org  2008-11-28 04:44 -------
(gdb) p debug_tree (decl)
 <var_decl 7af331b8 testcom
    type <record_type 7af79af8 BLK
        size <integer_cst 7af775c0 constant 6400>
        unit size <integer_cst 7af7ac40 constant 800>
        align 64 symtab 0 alias set -1 canonical type 7af79af8
        fields <field_decl 7af781e0 bprim type <array_type 7af797b8>
            BLK file
/test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/pr25162.f line 9 col 0 size
<integer_cst 7af775c0 6400> unit size <integer_cst 7af7ac40 800>
            align 64 offset_align 64
            offset <integer_cst 7af2b2e0 constant 0>
            bit offset <integer_cst 7af2b860 constant 0> context <record_type
7af79af8>>>
    addressable public static ignored common tls-local-exec decl_3 BLK
defer-output file /test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/pr25162.f
line 10 col 0 size <integer_cst 7af775c0 6400> unit size <integer_cst 7af7ac40
800>
    align 64 context <function_decl 7af7b400 test1> chain <function_decl
7af7b400 test1>>


-- 


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


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

* [Bug middle-end/38283] FAIL: libgomp.fortran/pr25162.f
  2008-11-27  2:30 [Bug libgomp/38283] New: FAIL: libgomp.fortran/pr25162.f danglin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-11-28  4:45 ` danglin at gcc dot gnu dot org
@ 2008-11-30 16:38 ` danglin at gcc dot gnu dot org
  2008-11-30 16:44 ` danglin at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-11-30 16:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from danglin at gcc dot gnu dot org  2008-11-30 16:37 -------
Subject: Bug 38283

Author: danglin
Date: Sun Nov 30 16:35:59 2008
New Revision: 142293

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142293
Log:
        PR middle-end/38283
        * varasm.c (emutls_finish): Fix common registration.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/varasm.c


-- 


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


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

* [Bug middle-end/38283] FAIL: libgomp.fortran/pr25162.f
  2008-11-27  2:30 [Bug libgomp/38283] New: FAIL: libgomp.fortran/pr25162.f danglin at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-11-30 16:38 ` danglin at gcc dot gnu dot org
@ 2008-11-30 16:44 ` danglin at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-11-30 16:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from danglin at gcc dot gnu dot org  2008-11-30 16:42 -------
Fixed.


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2008-11-30 16:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-27  2:30 [Bug libgomp/38283] New: FAIL: libgomp.fortran/pr25162.f danglin at gcc dot gnu dot org
2008-11-27  4:09 ` [Bug libgomp/38283] " danglin at gcc dot gnu dot org
2008-11-27  4:14 ` dave at hiauly1 dot hia dot nrc dot ca
2008-11-27 23:50 ` [Bug middle-end/38283] " danglin at gcc dot gnu dot org
2008-11-28  3:37 ` danglin at gcc dot gnu dot org
2008-11-28  4:45 ` danglin at gcc dot gnu dot org
2008-11-30 16:38 ` danglin at gcc dot gnu dot org
2008-11-30 16:44 ` danglin 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).