public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
@ 2014-11-11 10:53 fxcoudert at gcc dot gnu.org
  2014-11-11 10:55 ` [Bug ipa/63814] " fxcoudert at gcc dot gnu.org
                   ` (34 more replies)
  0 siblings, 35 replies; 36+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-11 10:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

            Bug ID: 63814
           Summary: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fxcoudert at gcc dot gnu.org

With -O3 -m32, g++.dg/ipa/pr61160-1.C fails on x86_64-apple-darwin14. This is a
very slightly reduced testcase:

---------------------------------
struct CBase {
  virtual void BaseFunc () {}
};

struct MMixin {
  virtual void * MixinFunc (int, int) = 0;
};

struct CExample: CBase, public MMixin
{
  void *MixinFunc (int arg, int arg2)
  {
    return this;
  }
};

void *test (MMixin & anExample)
{
  return anExample.MixinFunc (0, 0);
}

int main ()
{
  CExample c;
  return (test (c) != 0);
}
---------------------------------


The failure is:

$ ./bin/g++ pr61160-1.C -m32 -O3                
pr61160-1.C:26:1: error: edge points to wrong declaration:
 }
 ^
 <function_decl 0x142795e58 MixinFunc.constprop
    type <method_type 0x142799930
        type <pointer_type 0x1426272a0 type <void_type 0x142627150 void>
            public unsigned SI
            size <integer_cst 0x142601e70 constant 32>
            unit size <integer_cst 0x142601e88 constant 4>
            align 32 symtab 0 alias set 1 canonical type 0x1426272a0
            pointer_to_this <pointer_type 0x14262ec78>>
        QI
        size <integer_cst 0x142601fa8 constant 8>
        unit size <integer_cst 0x142601fc0 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x142799930 method
basetype <record_type 0x14277db28 CExample>
        arg-types <tree_list 0x1427a4370 value <pointer_type 0x14277ddc8>
            chain <tree_list 0x142617bb8 value <void_type 0x142627150 void>>>>
    readonly addressable used nothrow static autoinline decl_5 QI defer-output
file pr61160-1.C line 11 col 9 align 16 context <record_type 0x14277db28
CExample>>
 Instead of: <function_decl 0x14276ea20 _ZThn4_N8CExample9MixinFuncEii
    type <method_type 0x14277dd20
        type <pointer_type 0x1426272a0 type <void_type 0x142627150 void>
            public unsigned SI
            size <integer_cst 0x142601e70 constant 32>
            unit size <integer_cst 0x142601e88 constant 4>
            align 32 symtab 0 alias set 1 canonical type 0x1426272a0
            pointer_to_this <pointer_type 0x14262ec78>>
        QI
        size <integer_cst 0x142601fa8 constant 8>
        unit size <integer_cst 0x142601fc0 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x14277dd20 method
basetype <record_type 0x14277db28 CExample>
        arg-types <tree_list 0x14277c640 value <pointer_type 0x14277ddc8>
            chain <tree_list 0x14277c320 value <integer_type 0x142605690 int>
                chain <tree_list 0x14277c348 value <integer_type 0x142605690
int>
                    chain <tree_list 0x142617bb8 value <void_type 0x142627150
void>>>>>
        pointer_to_this <pointer_type 0x14277f3f0>>
    readonly addressable asm_written used public weak virtual decl_5 QI file
pr61160-1.C line 11 col 9 align 8 context <record_type 0x14277db28 CExample>
    full-name "virtual void* CExample::_ZThn4_N8CExample9MixinFuncEii(int,
int)"
   >
main/13 (int main()) @0x14278d188
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  First run: 0
  Function flags: body only_called_at_startup
  Called by: 
  Calls: _ZN8CExample9MixinFuncEii.constprop.3/35 (1.00 per call) (can throw
external) 
pr61160-1.C:26:1: internal compiler error: verify_cgraph_node failed

pr61160-1.C:26:1: internal compiler error: Abort trap: 6
g++: internal compiler error: Abort trap: 6 (program cc1plus)
zsh: abort      ./bin/g++ pr61160-1.C -m32 -O3


and the backtrace is:

  * frame #0: 0x0000000100ee03f0 cc1plus`internal_error(char const*, ...)
    frame #1: 0x000000010069adb7 cc1plus`cgraph_node::verify_node() + 4935
    frame #2: 0x000000010068fb48 cc1plus`symtab_node::verify() + 104
    frame #3: 0x00000001006904a8 cc1plus`symtab_node::verify_symtab_nodes() +
152
    frame #4: 0x000000010097ebfc
cc1plus`symbol_table::remove_unreachable_nodes(bool, __sFILE*) + 7148
    frame #5: 0x0000000100a5f60c cc1plus`execute_todo(unsigned int) + 348
    frame #6: 0x0000000100a61e2f cc1plus`execute_one_pass(opt_pass*) + 495
    frame #7: 0x0000000100a62aaa cc1plus`execute_ipa_pass_list(opt_pass*) + 154
    frame #8: 0x00000001006a18e9 cc1plus`symbol_table::compile() + 1385
    frame #9: 0x00000001006a375e
cc1plus`symbol_table::finalize_compilation_unit() + 110
    frame #10: 0x00000001001062e0 cc1plus`cp_write_global_declarations() + 4480
    frame #11: 0x0000000100b3cebf cc1plus`compile_file() + 143
    frame #12: 0x0000000100ff1ae4 cc1plus`toplev::main(int, char**) + 3764
    frame #13: 0x0000000100ff210c cc1plus`main + 44


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
@ 2014-11-11 10:55 ` fxcoudert at gcc dot gnu.org
  2014-11-11 11:47 ` dominiq at lps dot ens.fr
                   ` (33 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-11 10:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-apple-darwin14
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-11
                 CC|                            |enkovich.gnu at gmail dot com,
                   |                            |marxin at gcc dot gnu.org
               Host|                            |x86_64-apple-darwin14
     Ever confirmed|0                           |1
              Build|                            |x86_64-apple-darwin14


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
  2014-11-11 10:55 ` [Bug ipa/63814] " fxcoudert at gcc dot gnu.org
@ 2014-11-11 11:47 ` dominiq at lps dot ens.fr
  2014-11-11 22:51 ` dominiq at lps dot ens.fr
                   ` (32 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-11 11:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
This appeared between revisions r216154 (OK) and r216633 (ICE).


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
  2014-11-11 10:55 ` [Bug ipa/63814] " fxcoudert at gcc dot gnu.org
  2014-11-11 11:47 ` dominiq at lps dot ens.fr
@ 2014-11-11 22:51 ` dominiq at lps dot ens.fr
  2014-11-12  1:20 ` dominiq at lps dot ens.fr
                   ` (31 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-11 22:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
r216305 (+patches to bootstrap) is OK.


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-11-11 22:51 ` dominiq at lps dot ens.fr
@ 2014-11-12  1:20 ` dominiq at lps dot ens.fr
  2014-11-13  2:08 ` dominiq at lps dot ens.fr
                   ` (30 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-12  1:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Same failure for g++.dg/ipa/pr61160-2.C.


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-11-12  1:20 ` dominiq at lps dot ens.fr
@ 2014-11-13  2:08 ` dominiq at lps dot ens.fr
  2014-11-13  6:42 ` izamyatin at gmail dot com
                   ` (29 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-13  2:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kyukhin at gcc dot gnu.org

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
These regressions are due to pr216154 and do not show when gcc is configured
with --enable-checking=release.


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-11-13  2:08 ` dominiq at lps dot ens.fr
@ 2014-11-13  6:42 ` izamyatin at gmail dot com
  2014-11-13  7:26 ` dominiq at lps dot ens.fr
                   ` (28 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: izamyatin at gmail dot com @ 2014-11-13  6:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

Igor Zamyatin <izamyatin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |evstupac at gmail dot com,
                   |                            |izamyatin at gmail dot com

--- Comment #7 from Igor Zamyatin <izamyatin at gmail dot com> ---
So, is this compile time failure or runtime failure (or both for two tests)?


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-11-13  6:42 ` izamyatin at gmail dot com
@ 2014-11-13  7:26 ` dominiq at lps dot ens.fr
  2014-11-13  7:48 ` ubizjak at gmail dot com
                   ` (27 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-13  7:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> So, is this compile time failure or runtime failure (or both for two tests)?

If gcc is configured without --enable-checking=release (default checking for
trunk), it is a compile problem. If gcc is configured with
--enable-checking=release, it is a runtime problem.


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-11-13  7:26 ` dominiq at lps dot ens.fr
@ 2014-11-13  7:48 ` ubizjak at gmail dot com
  2014-11-13  9:26 ` ubizjak at gmail dot com
                   ` (26 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: ubizjak at gmail dot com @ 2014-11-13  7:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Igor Zamyatin from comment #7)
> So, is this compile time failure or runtime failure (or both for two tests)?

You can run the testsuite with "-m32 -fpic" on linux using:

make -j 4 -k check RUNTESTFLAGS="--target_board=unix/-m32/-fpic"
>From gcc-bugs-return-466607-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 13 08:06:22 2014
Return-Path: <gcc-bugs-return-466607-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17598 invoked by alias); 13 Nov 2014 08:06:21 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 17546 invoked by uid 48); 13 Nov 2014 08:06:17 -0000
From: "yroux at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgcc/56846] _Unwind_Backtrace on ARM and noexcept
Date: Thu, 13 Nov 2014 08:06:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libgcc
X-Bugzilla-Version: 4.7.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: yroux at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-56846-4-rqjL50ui0p@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-56846-4@http.gcc.gnu.org/bugzilla/>
References: <bug-56846-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg01079.txt.bz2
Content-length: 415

https://gcc.gnu.org/bugzilla/show_bug.cgi?idV846

--- Comment #14 from Yvan Roux <yroux at gcc dot gnu.org> ---

> No I meant FSF 4.8 branch. The bug log only show a commit to trunk and GCC
> 4.9 FSF branch.

It's only in trunk (the backport I made was in Linaro 4.9 branch).  For FSF
branches check with the maintainers and/or ping Tony, I don't mind doing it,
but it's maybe better if done by the patch owner.


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2014-11-13  7:48 ` ubizjak at gmail dot com
@ 2014-11-13  9:26 ` ubizjak at gmail dot com
  2014-11-13  9:41 ` izamyatin at gmail dot com
                   ` (25 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: ubizjak at gmail dot com @ 2014-11-13  9:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #9)
> (In reply to Igor Zamyatin from comment #7)
> > So, is this compile time failure or runtime failure (or both for two tests)?
> 
> You can run the testsuite with "-m32 -fpic" on linux using:
> 
> make -j 4 -k check RUNTESTFLAGS="--target_board=unix/-m32/-fpic"

I see:

FAIL: g++.dg/ipa/pr61160-2.C  -std=gnu++98 execution test
FAIL: g++.dg/ipa/pr61160-2.C  -std=gnu++11 execution test
FAIL: g++.dg/ipa/pr61160-2.C  -std=gnu++14 execution test

with the above command on i686-linux-gnu.
>From gcc-bugs-return-466626-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 13 09:27:27 2014
Return-Path: <gcc-bugs-return-466626-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 31006 invoked by alias); 13 Nov 2014 09:27:26 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 30327 invoked by uid 48); 13 Nov 2014 09:27:20 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/63841] [4.8/4.9/5 Regression] Incorrect strlen optimization after complete unroll
Date: Thu, 13 Nov 2014 09:27:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status assigned_to target_milestone short_desc
Message-ID: <bug-63841-4-cmIbYQF5TR@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63841-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63841-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg01098.txt.bz2
Content-length: 822

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc841

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
   Target Milestone|---                         |4.8.4
            Summary|Incorrect strlen            |[4.8/4.9/5 Regression]
                   |optimization after complete |Incorrect strlen
                   |unroll                      |optimization after complete
                   |                            |unroll

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r181172.  I'll take a look during stage3.


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2014-11-13  9:26 ` ubizjak at gmail dot com
@ 2014-11-13  9:41 ` izamyatin at gmail dot com
  2014-11-14  9:24 ` izamyatin at gmail dot com
                   ` (24 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: izamyatin at gmail dot com @ 2014-11-13  9:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #11 from Igor Zamyatin <izamyatin at gmail dot com> ---
Will take a look. Thanks!


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2014-11-13  9:41 ` izamyatin at gmail dot com
@ 2014-11-14  9:24 ` izamyatin at gmail dot com
  2014-11-14 18:35 ` hjl.tools at gmail dot com
                   ` (23 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: izamyatin at gmail dot com @ 2014-11-14  9:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #12 from Igor Zamyatin <izamyatin at gmail dot com> ---
So far it seems the issue unlikely caused by PIC-related changes in i686 - test
passes with -fno-devirtualize.


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2014-11-14  9:24 ` izamyatin at gmail dot com
@ 2014-11-14 18:35 ` hjl.tools at gmail dot com
  2014-11-14 18:36 ` hjl.tools at gmail dot com
                   ` (22 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-14 18:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Igor Zamyatin from comment #11)
> Will take a look. Thanks!

On Linux, the 32-bit PIC regression was introduced by r202145.


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

* [Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2014-11-14 18:35 ` hjl.tools at gmail dot com
@ 2014-11-14 18:36 ` hjl.tools at gmail dot com
  2014-11-14 18:39 ` [Bug ipa/63814] [4.9/5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC hjl.tools at gmail dot com
                   ` (21 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-14 18:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #13)
> (In reply to Igor Zamyatin from comment #11)
> > Will take a look. Thanks!
> 
> On Linux, the 32-bit PIC regression was introduced by r202145.

It is a -fdevirtualize-speculatively bug.


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

* [Bug ipa/63814] [4.9/5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2014-11-14 18:36 ` hjl.tools at gmail dot com
@ 2014-11-14 18:39 ` hjl.tools at gmail dot com
  2014-11-14 18:45 ` hjl.tools at gmail dot com
                   ` (20 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-14 18:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-apple-darwin14       |i686
               Host|x86_64-apple-darwin14       |
            Version|5.0                         |4.9.3
   Target Milestone|---                         |4.9.3
            Summary|g++.dg/ipa/pr61160-1.C      |[4.9/5 Regression]
                   |fails with -m32 on darwin14 |g++.dg/ipa/pr61160-1.C
                   |                            |fails with -m32 -fPIC
              Build|x86_64-apple-darwin14       |


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

* [Bug ipa/63814] [4.9/5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2014-11-14 18:39 ` [Bug ipa/63814] [4.9/5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC hjl.tools at gmail dot com
@ 2014-11-14 18:45 ` hjl.tools at gmail dot com
  2014-11-14 18:51 ` hjl.tools at gmail dot com
                   ` (19 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-14 18:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #14)
> (In reply to H.J. Lu from comment #13)
> > (In reply to Igor Zamyatin from comment #11)
> > > Will take a look. Thanks!
> > 
> > On Linux, the 32-bit PIC regression was introduced by r202145.
> 
> It is a -fdevirtualize-speculatively bug.

It only happens when --param ipa-cp-eval-threshold is used.


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

* [Bug ipa/63814] [4.9/5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2014-11-14 18:45 ` hjl.tools at gmail dot com
@ 2014-11-14 18:51 ` hjl.tools at gmail dot com
  2014-11-14 19:26 ` hjl.tools at gmail dot com
                   ` (18 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-14 18:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> ---
-fdevirtualize-speculatively doesn't work well with IPA-CP cloning
under 32-bit PIC.


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

* [Bug ipa/63814] [4.9/5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2014-11-14 18:51 ` hjl.tools at gmail dot com
@ 2014-11-14 19:26 ` hjl.tools at gmail dot com
  2014-11-14 23:16 ` hjl.tools at gmail dot com
                   ` (17 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-14 19:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #17 from H.J. Lu <hjl.tools at gmail dot com> ---
Without -fPIC, r202145 gave

pr63814.C:44:1: error: edge points to wrong declaration:
 }
 ^
 <function_decl 0x7f56f87c6400 MixinFunc.constprop
    type <method_type 0x7f56f87bdf18
        type <pointer_type 0x7f56f8643c78 type <void_type 0x7f56f8643bd0 void>
            public unsigned SI
            size <integer_cst 0x7f56f8627fc0 constant 32>
            unit size <integer_cst 0x7f56f8627fe0 constant 4>
            align 32 symtab 0 alias set 4 canonical type 0x7f56f8643c78
            pointer_to_this <pointer_type 0x7f56f8652888>>
        QI
        size <integer_cst 0x7f56f8645180 constant 8>
        unit size <integer_cst 0x7f56f86451a0 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x7f56f87bdf18 method
basetype <record_type 0x7f56f87a0738 CExample>
        arg-types <tree_list 0x7f56f87c86b8 value <pointer_type 0x7f56f87a09d8>
            chain <tree_list 0x7f56f8636aa0 value <void_type 0x7f56f8643bd0
void>>>>
    addressable used static autoinline decl_5 QI defer-output file pr63814.C
line 24 col 9 align 16 context <record_type 0x7f56f87a0738 CExample>
    full-name "void* CExample::MixinFunc.constprop()"
    pending-inline-info 0x7f56f87aa880>
 Instead of: <function_decl 0x7f56f8783900 _ZThn4_N8CExample9MixinFuncEiPv
    type <method_type 0x7f56f87a0bd0
        type <pointer_type 0x7f56f8643c78 type <void_type 0x7f56f8643bd0 void>
            public unsigned SI
            size <integer_cst 0x7f56f8627fc0 constant 32>
            unit size <integer_cst 0x7f56f8627fe0 constant 4>
            align 32 symtab 0 alias set 4 canonical type 0x7f56f8643c78
            pointer_to_this <pointer_type 0x7f56f8652888>>
        QI
        size <integer_cst 0x7f56f8645180 constant 8>
        unit size <integer_cst 0x7f56f86451a0 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x7f56f87a0bd0 method
basetype <record_type 0x7f56f87a0738 CExample>
        arg-types <tree_list 0x7f56f879f5a0 value <pointer_type 0x7f56f87a09d8>
            chain <tree_list 0x7f56f879f1e0 value <integer_type 0x7f56f86435e8
int>
                chain <tree_list 0x7f56f879f208 value <pointer_type
0x7f56f8643c78>
                    chain <tree_list 0x7f56f8636aa0 value <void_type
0x7f56f8643bd0 void>>>>>
        pointer_to_this <pointer_type 0x7f56f87a7150>>
    addressable asm_written used public weak virtual decl_5 QI file pr63814.C
line 24 col 9 align 8 context <record_type 0x7f56f87a0738 CExample>
    arguments <parm_decl 0x7f56f87aaa80 this
        type <pointer_type 0x7f56f87a0a80 type <record_type 0x7f56f87a0738
CExample>
            readonly unsigned SI size <integer_cst 0x7f56f8627fc0 32> unit size
<integer_cst 0x7f56f8627fe0 4>
            align 32 symtab 0 alias set -1 canonical type 0x7f56f87a0a80>
        readonly used unsigned SI file pr63814.C line 24 col 39 size
<integer_cst 0x7f56f8627fc0 32> unit size <integer_cst 0x7f56f8627fe0 4>
        align 32 context <function_decl 0x7f56f8783900
_ZThn4_N8CExample9MixinFuncEiPv> arg-type <pointer_type 0x7f56f87a0a80>
        chain <parm_decl 0x7f56f87aab00 arg type <integer_type 0x7f56f86435e8
int>
            used SI file pr63814.C line 24 col 24 size <integer_cst
0x7f56f8627fc0 32> unit size <integer_cst 0x7f56f8627fe0 4>
            align 32 context <function_decl 0x7f56f8783900
_ZThn4_N8CExample9MixinFuncEiPv>
            arg-type <integer_type 0x7f56f86435e8 int> chain <parm_decl
0x7f56f87aab80 arg2>>>
    full-name "virtual void* CExample::_ZThn4_N8CExample9MixinFuncEiPv(int,
void*)"
   >
main/14 (int main()) @0x7f56f87b1390
  Type: function definition analyzed
  Visibility: externally_visible public
  References: _ZTV5CBase/17 (addr)_ZTV6MMixin/16 (addr)_ZTV8CExample/15
(addr)_ZTV8CExample/15 (addr)
  Referring: 
  Availability: available
  Function flags: body only_called_at_startup
  Called by: 
  Calls: _ZN8CExample9MixinFuncEiPv.constprop.0/36 (1.00 per call) (can throw
external) 
pr63814.C:44:1: internal compiler error: verify_cgraph_node failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug ipa/63814] [4.9/5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2014-11-14 19:26 ` hjl.tools at gmail dot com
@ 2014-11-14 23:16 ` hjl.tools at gmail dot com
  2014-11-14 23:24 ` hjl.tools at gmail dot com
                   ` (16 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-14 23:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #18 from H.J. Lu <hjl.tools at gmail dot com> ---
Igor, Kirill, I confirmed r216154 is the cause of this
bug.  You can checkout both r216153 and r216154.  You build
2 compilers and compare results. You can build a cross
compiler with

.../gcc/configure --enable-languages=c,c++ --disable-bootstrap
--target=x86_64-apple-darwin

you will see ICE.  If you build the native Linux compiler, you
will see run-time failure.  The difference between good and
bad assembly code is

--- good.s    2014-11-14 14:54:54.362696443 -0800
+++ bad.s    2014-11-14 15:12:54.608434347 -0800
@@ -84,12 +84,12 @@ _ZN8CExample9MixinFuncEiPv:
     .weak    _ZThn4_N8CExample9MixinFuncEiPv
     .type    _ZThn4_N8CExample9MixinFuncEiPv, @function
 _ZThn4_N8CExample9MixinFuncEiPv:
-.LFB13:
+.LFB15:
     .cfi_startproc
     subl    $4, 4(%esp)
     jmp    .LTHUNK0
     .cfi_endproc
-.LFE13:
+.LFE15:
     .size    _ZThn4_N8CExample9MixinFuncEiPv,
.-_ZThn4_N8CExample9MixinFuncEiPv
     .section   
.text.unlikely._ZThn4_N8CExample9MixinFuncEiPv,"axG",@progbits,_ZN8CExample9MixinFuncEiPv,comdat
 .LCOLDE2:
@@ -105,20 +105,52 @@ _ZThn4_N8CExample9MixinFuncEiPv:
 _Z4testR6MMixin:
 .LFB11:
     .cfi_startproc
-    subl    $16, %esp
-    .cfi_def_cfa_offset 20
-    movl    20(%esp), %eax
+    pushl    %ebx
+    .cfi_def_cfa_offset 8
+    .cfi_offset 3, -8
+    call    __x86.get_pc_thunk.bx
+    addl    $_GLOBAL_OFFSET_TABLE_, %ebx
+    subl    $8, %esp
+    .cfi_def_cfa_offset 16
+    movl    16(%esp), %eax
     movl    (%eax), %edx
+    movl    (%edx), %edx
+    cmpl    _ZThn4_N8CExample9MixinFuncEiPv@GOT(%ebx), %edx
+    jne    .L10
+    cmpl    $48879, 12(%eax)
+    jne    .L14
+    addl    $8, %esp
+    .cfi_remember_state
+    .cfi_def_cfa_offset 8
+    popl    %ebx
+    .cfi_restore 3
+    .cfi_def_cfa_offset 4
+    ret
+    .p2align 4,,10
+    .p2align 3
+.L10:
+    .cfi_restore_state
+    subl    $4, %esp
+    .cfi_def_cfa_offset 20
     pushl    $0
     .cfi_def_cfa_offset 24
     pushl    $1
     .cfi_def_cfa_offset 28
     pushl    %eax
     .cfi_def_cfa_offset 32
-    call    *(%edx)
-    addl    $28, %esp
+    call    *%edx
+    addl    $16, %esp
+    .cfi_def_cfa_offset 16
+    addl    $8, %esp
+    .cfi_remember_state
+    .cfi_def_cfa_offset 8
+    popl    %ebx
+    .cfi_restore 3
     .cfi_def_cfa_offset 4
     ret
+.L14:
+    .cfi_restore_state
+    call    abort@PLT
     .cfi_endproc
 .LFE11:
     .size    _Z4testR6MMixin, .-_Z4testR6MMixin
@@ -265,11 +297,11 @@ _ZTV8CExample:
     .hidden    __x86.get_pc_thunk.bx
     .type    __x86.get_pc_thunk.bx, @function
 __x86.get_pc_thunk.bx:
-.LFB14:
+.LFB16:
     .cfi_startproc
     movl    (%esp), %ebx
     ret
     .cfi_endproc
-.LFE14:
+.LFE16:
     .ident    "GCC: (GNU) 5.0.0 20141013 (experimental)"
     .section    .note.GNU-stack,"",@progbits

Please find out why PIC register change caused this.


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

* [Bug ipa/63814] [4.9/5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2014-11-14 23:16 ` hjl.tools at gmail dot com
@ 2014-11-14 23:24 ` hjl.tools at gmail dot com
  2014-11-14 23:32 ` [Bug ipa/63814] [5 " hjl.tools at gmail dot com
                   ` (15 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-14 23:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #19 from H.J. Lu <hjl.tools at gmail dot com> ---
r216154 is supposed to be RTL change.  But it generates quite different
gimples.


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2014-11-14 23:24 ` hjl.tools at gmail dot com
@ 2014-11-14 23:32 ` hjl.tools at gmail dot com
  2014-11-14 23:34 ` hjl.tools at gmail dot com
                   ` (14 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-14 23:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.9.3                       |5.0
   Target Milestone|4.9.3                       |5.0
            Summary|[4.9/5 Regression]          |[5 Regression]
                   |g++.dg/ipa/pr61160-1.C      |g++.dg/ipa/pr61160-1.C
                   |fails with -m32 -fPIC       |fails with -m32 -fPIC


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  2014-11-14 23:32 ` [Bug ipa/63814] [5 " hjl.tools at gmail dot com
@ 2014-11-14 23:34 ` hjl.tools at gmail dot com
  2014-11-14 23:39 ` hubicka at ucw dot cz
                   ` (13 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-14 23:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> ---
It may be easier to debug this with a MacOS cross compiler.  Where do
extra gimple statements:

@@ -96,3 +96,31 @@ MMixin::MMixin() (struct MMixin * const
 }


+<built-in> (struct CExample * const this)
+{
+  struct CExample * const adjusted_this.8;
+  void * retval.7;
+
+  <bb 2>:
+  this_2 = this_1(D) + 4294967292;
+  adjusted_this.8_3 = this_2;
+  retval.7_6 = CExample::MixinFunc.constprop (adjusted_this.8_3); [tail call]
+  return retval.7_6;
+
+}
+
+
+<built-in> (struct CExample * const this)
+{
+  struct CExample * const adjusted_this.10;
+  void * retval.9;
+
+  <bb 2>:
+  this_2 = this_1(D) + 4294967292;
+  adjusted_this.10_3 = this_2;
+  retval.9_6 = CExample::MixinFunc.constprop (adjusted_this.10_3); [tail call]
+  return retval.9_6;
+
+}
+
+

come from?


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (20 preceding siblings ...)
  2014-11-14 23:34 ` hjl.tools at gmail dot com
@ 2014-11-14 23:39 ` hubicka at ucw dot cz
  2014-11-14 23:54 ` jamborm at gcc dot gnu.org
                   ` (12 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hubicka at ucw dot cz @ 2014-11-14 23:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #21 from Jan Hubicka <hubicka at ucw dot cz> ---
> +<built-in> (struct CExample * const this)
> +{
> +  struct CExample * const adjusted_this.8;
> +  void * retval.7;
> +
> +  <bb 2>:
> +  this_2 = this_1(D) + 4294967292;
> +  adjusted_this.8_3 = this_2;
> +  retval.7_6 = CExample::MixinFunc.constprop (adjusted_this.8_3); [tail call]
> +  return retval.7_6;
> +
> +}
> +
> +
> +<built-in> (struct CExample * const this)
> +{
> +  struct CExample * const adjusted_this.10;
> +  void * retval.9;
> +
> +  <bb 2>:
> +  this_2 = this_1(D) + 4294967292;
> +  adjusted_this.10_3 = this_2;
> +  retval.9_6 = CExample::MixinFunc.constprop (adjusted_this.10_3); [tail call]
> +  return retval.9_6;
> +
> +}
> +
> +
> 
> come from?
This is expanded thunk produce dby cgraph_node::expand_thunk
Did not look into the testcase if it should be there or not.

Honza


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (21 preceding siblings ...)
  2014-11-14 23:39 ` hubicka at ucw dot cz
@ 2014-11-14 23:54 ` jamborm at gcc dot gnu.org
  2014-11-15  1:06 ` hjl.tools at gmail dot com
                   ` (11 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-11-14 23:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #22 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #21)
> This is expanded thunk produce dby cgraph_node::expand_thunk
> Did not look into the testcase if it should be there or not.
> 

Indeed.  expand_thunk creates this when
targetm.asm_out.can_output_mi_thunk returns false.  Therefore a change
in the back-end can cause this difference.  The back-end changes might
be OK, we have had a bug like this in IPA before.

Do I understand correctly that this bug is an ICE with checking
compiler and miscompilation with release-checking one?


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (22 preceding siblings ...)
  2014-11-14 23:54 ` jamborm at gcc dot gnu.org
@ 2014-11-15  1:06 ` hjl.tools at gmail dot com
  2014-11-20 12:52 ` rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-15  1:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #23 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Martin Jambor from comment #22)
> (In reply to Jan Hubicka from comment #21)
> > This is expanded thunk produce dby cgraph_node::expand_thunk
> > Did not look into the testcase if it should be there or not.
> > 
> 
> Indeed.  expand_thunk creates this when
> targetm.asm_out.can_output_mi_thunk returns false.  Therefore a change
> in the back-end can cause this difference.  The back-end changes might
> be OK, we have had a bug like this in IPA before.
> 
> Do I understand correctly that this bug is an ICE with checking

ICE only with x86_64-apple-darwin cross compiler.

> compiler and miscompilation with release-checking one?

Miscompile on both x86_64-apple-darwin and Linux.


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (23 preceding siblings ...)
  2014-11-15  1:06 ` hjl.tools at gmail dot com
@ 2014-11-20 12:52 ` rguenth at gcc dot gnu.org
  2014-11-20 18:12 ` jamborm at gcc dot gnu.org
                   ` (9 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-20 12:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (24 preceding siblings ...)
  2014-11-20 12:52 ` rguenth at gcc dot gnu.org
@ 2014-11-20 18:12 ` jamborm at gcc dot gnu.org
  2014-11-20 18:14 ` jamborm at gcc dot gnu.org
                   ` (8 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-11-20 18:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jamborm at gcc dot gnu.org


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (25 preceding siblings ...)
  2014-11-20 18:12 ` jamborm at gcc dot gnu.org
@ 2014-11-20 18:14 ` jamborm at gcc dot gnu.org
  2014-11-21 19:23 ` jamborm at gcc dot gnu.org
                   ` (7 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-11-20 18:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #24 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Created attachment 34056
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34056&action=edit
Untested fix

I'm testing this patch


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (26 preceding siblings ...)
  2014-11-20 18:14 ` jamborm at gcc dot gnu.org
@ 2014-11-21 19:23 ` jamborm at gcc dot gnu.org
  2014-11-28 12:36 ` jamborm at gcc dot gnu.org
                   ` (6 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-11-21 19:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #25 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I proposed a fix on the mailing list:

https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02832.html

If it gets accepted, please feel free to add the testcase(s).  I only
checked using a darwin cross compiler and so could not easily verify
the test would fail without the patch when run as part of the
testsuite.  Ditto if you know what is the correct way to add a
testcase that should only be run on x86 -m32 with -fpic.  Thanks.


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (27 preceding siblings ...)
  2014-11-21 19:23 ` jamborm at gcc dot gnu.org
@ 2014-11-28 12:36 ` jamborm at gcc dot gnu.org
  2014-12-02 10:13 ` jamborm at gcc dot gnu.org
                   ` (5 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-11-28 12:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #27 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #26)
> > I proposed a fix on the mailing list:
> >
> > https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02832.html
> 
> I have this patch in my working tree as well as the patch at
> 
> https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02838.html
> 
> and the regression is gone (x86_64-apple-darwin14).

Thanks for the confirmation, now we just need Honza to approve at
least the first patch if not both.  I will ping them on mailing list
soon.


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (28 preceding siblings ...)
  2014-11-28 12:36 ` jamborm at gcc dot gnu.org
@ 2014-12-02 10:13 ` jamborm at gcc dot gnu.org
  2014-12-02 10:16 ` jamborm at gcc dot gnu.org
                   ` (4 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-12-02 10:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #28 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Author: jamborm
Date: Tue Dec  2 10:12:27 2014
New Revision: 218265

URL: https://gcc.gnu.org/viewcvs?rev=218265&root=gcc&view=rev
Log:
2014-12-02  Martin Jambor  <mjambor@suse.cz>

    PR ipa/63814
    * ipa-cp.c (same_node_or_its_all_contexts_clone_p): New function.
    (cgraph_edge_brings_value_p): New parameter dest, use
    same_node_or_its_all_contexts_clone_p and check availability.
    (cgraph_edge_brings_value_p): Likewise.
    (get_info_about_necessary_edges): New parameter dest, pass it to
    cgraph_edge_brings_value_p.  Update caller.
    (gather_edges_for_value): Likewise.
    (perhaps_add_new_callers): Use cgraph_edge_brings_value_p to check
    both the destination and availability.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-cp.c


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (29 preceding siblings ...)
  2014-12-02 10:13 ` jamborm at gcc dot gnu.org
@ 2014-12-02 10:16 ` jamborm at gcc dot gnu.org
  2014-12-02 10:33 ` fxcoudert at gcc dot gnu.org
                   ` (3 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-12-02 10:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

Martin Jambor <jamborm at gcc dot gnu.org> changed:

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

--- Comment #29 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Fixed (and as I wrote in comment #25, feel free to add testcases if
you know how and have environment in which you can verify they would
fail without the fix when run by the testsuite).


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (30 preceding siblings ...)
  2014-12-02 10:16 ` jamborm at gcc dot gnu.org
@ 2014-12-02 10:33 ` fxcoudert at gcc dot gnu.org
  2014-12-02 12:40 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-12-02 10:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #30 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #29)
> Fixed (and as I wrote in comment #25, feel free to add testcases if
> you know how and have environment in which you can verify they would
> fail without the fix when run by the testsuite).

On darwin, it's already covered by g++.dg/ipa/pr61160-1.C
For linux, I cannot don't know and cannot test.


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (31 preceding siblings ...)
  2014-12-02 10:33 ` fxcoudert at gcc dot gnu.org
@ 2014-12-02 12:40 ` hjl.tools at gmail dot com
  2014-12-02 12:48 ` hjl at gcc dot gnu.org
  2014-12-02 12:50 ` hjl.tools at gmail dot com
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-12-02 12:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

H.J. Lu <hjl.tools at gmail dot com> changed:

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

--- Comment #31 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Martin Jambor from comment #29)
> Fixed (and as I wrote in comment #25, feel free to add testcases if
> you know how and have environment in which you can verify they would
> fail without the fix when run by the testsuite).

It isn't fixed on Linux.


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (32 preceding siblings ...)
  2014-12-02 12:40 ` hjl.tools at gmail dot com
@ 2014-12-02 12:48 ` hjl at gcc dot gnu.org
  2014-12-02 12:50 ` hjl.tools at gmail dot com
  34 siblings, 0 replies; 36+ messages in thread
From: hjl at gcc dot gnu.org @ 2014-12-02 12:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #32 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Tue Dec  2 12:47:29 2014
New Revision: 218268

URL: https://gcc.gnu.org/viewcvs?rev=218268&root=gcc&view=rev
Log:
Add a test for PR ipa/63814

    PR ipa/63814
    * g++.dg/ipa/pr63814.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/ipa/pr63814.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug ipa/63814] [5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC
  2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
                   ` (33 preceding siblings ...)
  2014-12-02 12:48 ` hjl at gcc dot gnu.org
@ 2014-12-02 12:50 ` hjl.tools at gmail dot com
  34 siblings, 0 replies; 36+ messages in thread
From: hjl.tools at gmail dot com @ 2014-12-02 12:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

H.J. Lu <hjl.tools at gmail dot com> changed:

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

--- Comment #33 from H.J. Lu <hjl.tools at gmail dot com> ---
Without r218265, the new testcase fails on Linux.


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

end of thread, other threads:[~2014-12-02 12:50 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-11 10:53 [Bug ipa/63814] New: g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14 fxcoudert at gcc dot gnu.org
2014-11-11 10:55 ` [Bug ipa/63814] " fxcoudert at gcc dot gnu.org
2014-11-11 11:47 ` dominiq at lps dot ens.fr
2014-11-11 22:51 ` dominiq at lps dot ens.fr
2014-11-12  1:20 ` dominiq at lps dot ens.fr
2014-11-13  2:08 ` dominiq at lps dot ens.fr
2014-11-13  6:42 ` izamyatin at gmail dot com
2014-11-13  7:26 ` dominiq at lps dot ens.fr
2014-11-13  7:48 ` ubizjak at gmail dot com
2014-11-13  9:26 ` ubizjak at gmail dot com
2014-11-13  9:41 ` izamyatin at gmail dot com
2014-11-14  9:24 ` izamyatin at gmail dot com
2014-11-14 18:35 ` hjl.tools at gmail dot com
2014-11-14 18:36 ` hjl.tools at gmail dot com
2014-11-14 18:39 ` [Bug ipa/63814] [4.9/5 Regression] g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC hjl.tools at gmail dot com
2014-11-14 18:45 ` hjl.tools at gmail dot com
2014-11-14 18:51 ` hjl.tools at gmail dot com
2014-11-14 19:26 ` hjl.tools at gmail dot com
2014-11-14 23:16 ` hjl.tools at gmail dot com
2014-11-14 23:24 ` hjl.tools at gmail dot com
2014-11-14 23:32 ` [Bug ipa/63814] [5 " hjl.tools at gmail dot com
2014-11-14 23:34 ` hjl.tools at gmail dot com
2014-11-14 23:39 ` hubicka at ucw dot cz
2014-11-14 23:54 ` jamborm at gcc dot gnu.org
2014-11-15  1:06 ` hjl.tools at gmail dot com
2014-11-20 12:52 ` rguenth at gcc dot gnu.org
2014-11-20 18:12 ` jamborm at gcc dot gnu.org
2014-11-20 18:14 ` jamborm at gcc dot gnu.org
2014-11-21 19:23 ` jamborm at gcc dot gnu.org
2014-11-28 12:36 ` jamborm at gcc dot gnu.org
2014-12-02 10:13 ` jamborm at gcc dot gnu.org
2014-12-02 10:16 ` jamborm at gcc dot gnu.org
2014-12-02 10:33 ` fxcoudert at gcc dot gnu.org
2014-12-02 12:40 ` hjl.tools at gmail dot com
2014-12-02 12:48 ` hjl at gcc dot gnu.org
2014-12-02 12:50 ` hjl.tools at gmail dot com

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).