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

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