public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/51174] New: AIX unexpected error_mark node in new TM tests
@ 2011-11-16 16:30 dje at gcc dot gnu.org
  2011-11-16 16:44 ` [Bug other/51174] " dje at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: dje at gcc dot gnu.org @ 2011-11-16 16:30 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51174
           Summary: AIX unexpected error_mark node in new TM tests
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dje@gcc.gnu.org


AIX testsuite shows a large number of internal compiler errors from TM tests
due to tree check failures finding error_mark nodes.

/farm/dje/src/src/gcc/testsuite/c-c++-common/tm/freq.c:14:1: internal
compiler error: tree check: expected tree that contains 'decl common'
structure, have 'error_mark' in rs6000_xcoff_section_type_flags, at
config/rs60\
00/rs6000.c:25791

/farm/dje/src/src/gcc/testsuite/g++.dg/tm/pr45940-3.C:69:1: internal compiler
er
ror: tree check: expected identifier_node, have error_mark in tm_mangle, at
tran
s-mem.c:4107


/farm/dje/src/src/gcc/testsuite/c-c++-common/tm/inline-asm-2.c:8:1:
/farm/dje/src/src/gcc/testsuite/c-c++-common/tm/memcpy-1.c:9:1:
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/20100727.C:796:1:
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/alias.C:17:1:
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/attrib-2.C:16:19:
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/attrib-3.C:27:15:
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/nested-1.C:22:1:
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/nested-2.C:41:1:
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/nested-3.C:43:1:
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/pr45940-3.C:69:1:
etc.


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
@ 2011-11-16 16:44 ` dje at gcc dot gnu.org
  2011-11-16 16:55 ` dje at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dje at gcc dot gnu.org @ 2011-11-16 16:44 UTC (permalink / raw)
  To: gcc-bugs

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

David Edelsohn <dje at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |alpha-dec-osf5.1b,
                   |                            |powerpc-ibm-aix*
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-11-16
                 CC|                            |aldyh at gcc dot gnu.org,
                   |                            |ro at gcc dot gnu.org,
                   |                            |torvald at gcc dot gnu.org
               Host|                            |alpha-dec-osf5.1b,
                   |                            |powerpc-ibm-aix*
     Ever Confirmed|0                           |1
              Build|                            |alpha-dec-osf5.1b,
                   |                            |powerpc-ibm-aix*

--- Comment #1 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-16 16:31:00 UTC ---
Confirmed. I think this may be present on alpha-dec-osf as well.


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
  2011-11-16 16:44 ` [Bug other/51174] " dje at gcc dot gnu.org
@ 2011-11-16 16:55 ` dje at gcc dot gnu.org
  2011-11-16 18:24 ` dje at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dje at gcc dot gnu.org @ 2011-11-16 16:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-16 16:45:01 UTC ---
/tmp/20111115/gcc/xgcc -B/tmp/20111115/gcc/
/farm/dje/src/src/gcc/testsuite/c-c++-common/tm/freq.c    -fgnu-tm -O -S  -o
freq.s
/tmp/20111115/gcc/xgcc -B/tmp/20111115/gcc/ /farm/dje/src/src
/gcc/testsuite/gcc.dg/tm/20100519.c    -fgnu-tm -O -S  -o 20100519.s


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
  2011-11-16 16:44 ` [Bug other/51174] " dje at gcc dot gnu.org
  2011-11-16 16:55 ` dje at gcc dot gnu.org
@ 2011-11-16 18:24 ` dje at gcc dot gnu.org
  2011-11-16 18:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dje at gcc dot gnu.org @ 2011-11-16 18:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-16 17:59:47 UTC ---
(gdb) print decl
$1 = 0x0
(gdb) where
#0  internal_error (
    gmsgid=0x11288a94 "tree check: expected tree that contains %qs structure,
have %qs in %s, at %s:%d") at /farm/dje/src/src/gcc/diagnostic.c:843
#1  0x10051dc8 in tree_contains_struct_check_failed (node=0x0, 
    en=TS_DECL_COMMON, 
    file=0x1129cd18 "/farm/dje/src/src/gcc/config/rs6000/rs6000.c", 
    line=25791, function=0x112a5a28 "rs6000_xcoff_section_type_flags")
    at /farm/dje/src/src/gcc/tree.c:8986
#2  0x102d57e8 in rs6000_xcoff_section_type_flags (decl=0x0, 
    name=0x112a85dc ".tm_clone_table", reloc=3)
    at /farm/dje/src/src/gcc/config/rs6000/rs6000.c:25789
#3  0x10340ed4 in get_named_section (decl=0x0, 
    name=0x112a85dc ".tm_clone_table", reloc=3)
    at /farm/dje/src/src/gcc/varasm.c:408
#4  0x10362698 in dump_tm_clone_pairs (tm_alias_pairs=0x30186be8)
    at /farm/dje/src/src/gcc/varasm.c:5964
#5  0x10362a9c in finish_tm_clone_pairs ()
    at /farm/dje/src/src/gcc/varasm.c:6010
#6  0x10002010 in compile_file () at /farm/dje/src/src/gcc/toplev.c:602
#7  0x100056bc in do_compile () at /farm/dje/src/src/gcc/toplev.c:1931
#8  0x100058e0 in toplev_main (argc=4, argv=0x2ff22258)
    at /farm/dje/src/src/gcc/toplev.c:2007
#9  0x10000570 in main (argc=4, argv=0x2ff22258)
    at /farm/dje/src/src/gcc/main.c:36

switch_to_section (get_named_section (NULL, ".tm_clone_table", 3));

Why is NULL being passed to get_named_section() as the decl?


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-11-16 18:24 ` dje at gcc dot gnu.org
@ 2011-11-16 18:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2011-11-16 19:04 ` dje at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-11-16 18:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-11-16 18:23:22 UTC ---
> --- Comment #1 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-16 16:31:00 UTC ---
> Confirmed. I think this may be present on alpha-dec-osf as well.

The failure on Tru64 UNIX is related, but more fundamental: the platform
uses ECOFF, which completely lacks named section support.  The tests
fail with

FAIL: libitm.c/cancel.c (internal compiler error)
FAIL: libitm.c/cancel.c (test for excess errors)
Excess errors:
/vol/gcc/src/hg/trunk/local/libitm/testsuite/libitm.c/cancel.c:55:1: internal
co
mpiler error: in default_no_named_section, at varasm.c:6293

WARNING: libitm.c/cancel.c compilation failed to produce executable

    Rainer


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-11-16 18:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-11-16 19:04 ` dje at gcc dot gnu.org
  2011-11-16 19:11 ` dje at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dje at gcc dot gnu.org @ 2011-11-16 19:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-16 18:30:29 UTC ---
The rs6000.c failure looks like rs6000_xcoff_section_type_flags() should deal
with decl == NULL.

But the other similar failure is in trans-mem.c:

(gdb) where
#0  internal_error (
    gmsgid=0x10bcf1dc "tree check: %s, have %s in %s, at %s:%d")
    at /farm/dje/src/src/gcc/diagnostic.c:844
#1  0x10131540 in tree_check_failed (node=0x0, 
    file=0x10c68e50 "/farm/dje/src/src/gcc/trans-mem.c", line=4107, 
    function=0x10c68ec8 "tm_mangle") at /farm/dje/src/src/gcc/tree.c:8815
#2  0x10881f00 in tm_mangle (old_asm_id=0x0)
    at /farm/dje/src/src/gcc/trans-mem.c:4107
#3  0x1088ca48 in ipa_tm_execute () at /farm/dje/src/src/gcc/trans-mem.c:8862
#4  0x1019f6e8 in execute_one_pass (pass=0x300f7d7c)
    at /farm/dje/src/src/gcc/passes.c:2074
#5  0x101a0104 in execute_ipa_pass_list (pass=0x300f7d7c)
    at /farm/dje/src/src/gcc/passes.c:2441
#6  0x1048eb38 in cgraph_optimize () at /farm/dje/src/src/gcc/cgraphunit.c:4155
#7  0x1048f2a8 in cgraph_finalize_compilation_unit ()
    at /farm/dje/src/src/gcc/cgraphunit.c:1327
#8  0x109453b8 in cp_write_global_declarations ()
    at /farm/dje/src/src/gcc/cp/decl2.c:4050
#9  0x100031a8 in toplev_main (argc=4, argv=0x2ff22268)
    at /farm/dje/src/src/gcc/toplev.c:581
#10 0x100003a0 in main (argc=280818140, argv=0x2ff21d90)
    at /farm/dje/src/src/gcc/main.c:36

DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));


(gdb) print old_decl
$3 = 0x700d6000
(gdb) pt
 <function_decl 700d6000 __comp_dtor 
    type <method_type 700d4e40
        type <void_type 70014780 void VOID
            align 8 symtab 0 alias set -1 canonical type 70014780
            pointer_to_this <pointer_type 700147e0>>
        SI
        size <integer_cst 70005620 constant 32>
        unit size <integer_cst 70005640 constant 4>
        align 32 symtab 0 alias set -1 canonical type 700d4d20
        attributes <tree_list 700d2660
            purpose <identifier_node 700bf2d8 transaction_safe
                bindings <0>
                local bindings <0>>> method basetype <record_type 700d4b40
shared_count>
        arg-types <tree_list 700d2648 value <pointer_type 700d4d80>
            chain <tree_list 70013d80 value <void_type 70014780 void>>>
        pointer_to_this <pointer_type 700da6c0>>
    addressable used public static weak autoinline decl_5 SI defer-output file
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/pr45940-3.C line 53 col 5 align 32
context <record_type 700d4b40 shared_count> initial <block 7001acc0>
abstract_origin <function_decl 700c6f00 shared_count>
    arguments <parm_decl 700d03c8 this
        type <pointer_type 700d4de0 type <record_type 700d4b40 shared_count>
            readonly unsigned SI size <integer_cst 70005620 32> unit size
<integer_cst 70005640 4>
            align 32 symtab 0 alias set -1 canonical type 700d4de0>
        readonly used unsigned SI file
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/pr45940-3.C line 53 col 19 size
<integer_cst 70005620 32> unit size <integer_cst 70005640 4>
        align 32 context <function_decl 700d6000 __comp_dtor > abstract_origin
<parm_decl 700d0268 this> arg-type <pointer_type 700d4de0>>
    result <result_decl 700c2910 D.2008 type <void_type 70014780 void>
        ignored VOID file /farm/dje/src/src/gcc/testsuite/g++.dg/tm/pr45940-3.C
line 56 col 5
        align 8 context <function_decl 700d6000 __comp_dtor >>
    full-name "shared_count::~shared_count()"
    pending-inline-info 700d7b00
    struct-function 700da2a0>
(gdb) print new_decl
$4 = 0x700e5480
(gdb) pt
 <function_decl 700e5480 __comp_dtor 
    type <method_type 700d4e40
        type <void_type 70014780 void VOID
            align 8 symtab 0 alias set -1 canonical type 70014780
            pointer_to_this <pointer_type 700147e0>>
        SI
        size <integer_cst 70005620 constant 32>
        unit size <integer_cst 70005640 constant 4>
        align 32 symtab 0 alias set -1 canonical type 700d4d20
        attributes <tree_list 700d2660
            purpose <identifier_node 700bf2d8 transaction_safe
                bindings <0>
                local bindings <0>>> method basetype <record_type 700d4b40
shared_count>
        arg-types <tree_list 700d2648 value <pointer_type 700d4d80>
            chain <tree_list 70013d80 value <void_type 70014780 void>>>
        pointer_to_this <pointer_type 700da6c0>>
    addressable used public static weak autoinline decl_5 SI defer-output file
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/pr45940-3.C line 53 col 5 align 32
context <record_type 700d4b40 shared_count> initial <block 7001acc0>
abstract_origin <function_decl 700c6f00 shared_count>
    arguments <parm_decl 700d03c8 this
        type <pointer_type 700d4de0 type <record_type 700d4b40 shared_count>
            readonly unsigned SI size <integer_cst 70005620 32> unit size
<integer_cst 70005640 4>
            align 32 symtab 0 alias set -1 canonical type 700d4de0>
        readonly used unsigned SI file
/farm/dje/src/src/gcc/testsuite/g++.dg/tm/pr45940-3.C line 53 col 19 size
<integer_cst 70005620 32> unit size <integer_cst 70005640 4>
        align 32 context <function_decl 700d6000 __comp_dtor > abstract_origin
<parm_decl 700d0268 this> arg-type <pointer_type 700d4de0>>
    result <result_decl 700c2910 D.2008 type <void_type 70014780 void>
        ignored VOID file /farm/dje/src/src/gcc/testsuite/g++.dg/tm/pr45940-3.C
line 56 col 5
        align 8 context <function_decl 700d6000 __comp_dtor >>
    full-name "shared_count::~shared_count()"
    pending-inline-info 700d7b00
    struct-function 700da2a0>


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-11-16 19:04 ` dje at gcc dot gnu.org
@ 2011-11-16 19:11 ` dje at gcc dot gnu.org
  2011-11-17 18:27 ` aldyh at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dje at gcc dot gnu.org @ 2011-11-16 19:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-16 18:43:06 UTC ---
DECL_COMDAT field validly can be NULL on some targets.  And most other uses
seem to be copying the value.  I think that tm_mangle() needs to be prepared
for its argument to be NULL or don't call tm_mangle() if DECL_COMDAT fiels is
NULL.  Maybe something like:

  /* Perform the same remapping to the comdat group.  */
  if (DECL_COMDAT (new_decl) && DECL_COMDAT_GROUP (old_decl))
    DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
  else
    DECL_COMDAT_GROUP (new_decl) = DECL_COMDAT_GROUP (old_decl);

in ipa_tm_create_version() and ipa_tm_create_version_alias().


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-11-16 19:11 ` dje at gcc dot gnu.org
@ 2011-11-17 18:27 ` aldyh at gcc dot gnu.org
  2011-11-17 19:24 ` dje at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-11-17 18:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-11-17 18:06:20 UTC ---

> The rs6000.c failure looks like rs6000_xcoff_section_type_flags() should deal
> with decl == NULL.
> 
> But the other similar failure is in trans-mem.c:
> 
> (gdb) where
> #0  internal_error (

How can I reproduce this additional error in trans-mem.c?

David, after using your patch handling NULL in
rs6000_xcoff_section_type_flags(), I can cc1/cc1plus all the aforementioned
failures in this PR correctly (with a cross to powerpc-ibm-aix5.3.0.0).

Is this similar failure you mention something else?  Is there a testcase?


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-11-17 18:27 ` aldyh at gcc dot gnu.org
@ 2011-11-17 19:24 ` dje at gcc dot gnu.org
  2011-11-17 19:26 ` aldyh at redhat dot com
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dje at gcc dot gnu.org @ 2011-11-17 19:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-17 18:37:36 UTC ---
> How can I reproduce this additional error in trans-mem.c?

I believe that you need to use a target that does not define HAVE_COMDAT_GROUP.
 Other targets do not fill in DECL_COMDAT_GROUP, but do use DECL_COMDAT.  The
rest of GCC blindly copies around NULLs and the value never is used.  The TM
code assumes that all targets with DECL_COMDAT fill in the DECL_COMDAT_GROUP
node with a specific content and format that it should mangle.

My proposed patch, which appears to work, reverts to copying NULLs if
DECL_COMDAT_GROUP is NULL.  One could test

  if (DECL_COMDAT (new_decl) && HAVE_COMDAT_GRUOP)

and that probably is more consistent with the rest of varasm.c

> After using your patch handling NULL in
> rs6000_xcoff_section_type_flags(), I can cc1/cc1plus all the aforementioned
> failures in this PR correctly (with a cross to powerpc-ibm-aix5.3.0.0).

I do not understand what you are asking.  You can reproduce the failures or you
cannot?  My rs6000.c patch fixes some of the failures.  The varasm.c patch is
necessary to fix the rest of the failures -- the ones in trans-mem.c.

> Is this similar failure you mention something else?  Is there a testcase?

Is what similar?  When this is broken, the existing TM testcases fail all over
the place, so I don't think there is a need for additional testcases.


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-11-17 19:24 ` dje at gcc dot gnu.org
@ 2011-11-17 19:26 ` aldyh at redhat dot com
  2011-11-17 19:32 ` dje at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: aldyh at redhat dot com @ 2011-11-17 19:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Aldy Hernandez <aldyh at redhat dot com> 2011-11-17 19:04:43 UTC ---
> I do not understand what you are asking.  You can reproduce the failures or you
> cannot?  My rs6000.c patch fixes some of the failures.  The varasm.c patch is
> necessary to fix the rest of the failures -- the ones in trans-mem.c.

Oh sorry, I cannot reproduce the failures after your NULL handling patch 
went into mainline.  Which failures are you still seeing, after your patch?


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-11-17 19:26 ` aldyh at redhat dot com
@ 2011-11-17 19:32 ` dje at gcc dot gnu.org
  2011-11-18 18:01 ` aldyh at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dje at gcc dot gnu.org @ 2011-11-17 19:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-17 19:23:11 UTC ---
My patch did not fix the testsuite failures in trans-mem.c:tm_mangle() where
ipa_tm_create_version() and ipa_tm_create_version_alias() call tm_mangle() with
DECL_COMDAT_GROUP field NULL.  tm_mangle() tries to reference the field.

As I wrote in comment 6, I suggest that ipa_tm_create_version() and
ipa_tm_create_version_alias() only invoke tm_mangle if the platform defines
HAVE_COMDAT_GROUP, otherwise copy the NULL value like the rest of GCC:

  /* Perform the same remapping to the comdat group.  */
  if (DECL_COMDAT (new_decl) && HAVE_COMDAT_GROUP)
    DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
  else
    DECL_COMDAT_GROUP (new_decl) = DECL_COMDAT_GROUP (old_decl);

One could have tm_mangle() check for NULL, but I think it is reasonable for it
to expect a non-NULL argument and it is used in other mangling situations.  The
problem, IMHO, is calling tm_mangle() with DECL_COMDAT_GROUP argument assuming
that field of the decl is non-NULL.


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2011-11-17 19:32 ` dje at gcc dot gnu.org
@ 2011-11-18 18:01 ` aldyh at gcc dot gnu.org
  2011-11-18 18:39 ` dje at gcc dot gnu.org
  2011-12-21 14:30 ` aldyh at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-11-18 18:01 UTC (permalink / raw)
  To: gcc-bugs

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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |aldyh at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #11 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-11-18 17:39:34 UTC ---
Created attachment 25853
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25853
proposed patch

David, so from the logic in trans-mem.c I assume that DECL_COMDAT is set on AIX
but DECL_COMDAT_GROUP is NULL.  Is this correct?

If that is the case, can you see if this patch fixes your problem?


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2011-11-18 18:01 ` aldyh at gcc dot gnu.org
@ 2011-11-18 18:39 ` dje at gcc dot gnu.org
  2011-12-21 14:30 ` aldyh at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: dje at gcc dot gnu.org @ 2011-11-18 18:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-18 18:20:50 UTC ---
Your patch will fix the problem, but, as I wrote in comment 10, I think it is
wrong.  I guess you can change the semantics of tm_mangle() to return NULL for
NULL argument, but it covers up potential bugs.  tm_mangle() should not be
called with NULL argument and any caller that does should be fixed.


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

* [Bug other/51174] AIX unexpected error_mark node in new TM tests
  2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2011-11-18 18:39 ` dje at gcc dot gnu.org
@ 2011-12-21 14:30 ` aldyh at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-12-21 14:30 UTC (permalink / raw)
  To: gcc-bugs

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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

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

--- Comment #13 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-12-21 14:07:40 UTC ---
fixed on trunk


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

end of thread, other threads:[~2011-12-21 14:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-16 16:30 [Bug other/51174] New: AIX unexpected error_mark node in new TM tests dje at gcc dot gnu.org
2011-11-16 16:44 ` [Bug other/51174] " dje at gcc dot gnu.org
2011-11-16 16:55 ` dje at gcc dot gnu.org
2011-11-16 18:24 ` dje at gcc dot gnu.org
2011-11-16 18:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-11-16 19:04 ` dje at gcc dot gnu.org
2011-11-16 19:11 ` dje at gcc dot gnu.org
2011-11-17 18:27 ` aldyh at gcc dot gnu.org
2011-11-17 19:24 ` dje at gcc dot gnu.org
2011-11-17 19:26 ` aldyh at redhat dot com
2011-11-17 19:32 ` dje at gcc dot gnu.org
2011-11-18 18:01 ` aldyh at gcc dot gnu.org
2011-11-18 18:39 ` dje at gcc dot gnu.org
2011-12-21 14:30 ` aldyh at gcc dot gnu.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).