[Bug c++/43313] ICE with non-POD and covariant return thunks

2017-03-02 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43313

Segher Boessenkool  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||segher at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #9 from Segher Boessenkool  ---
At least GCC 6 and later refuse this testcase:

36:7: error: 'virtual ICarousel::~ICarousel()' is private within this context

(but it accepts it with -std=c++03).

I cannot get it to crash with 4.9 or later, -O1 or -O2, -m32 or -m64.
Closing as fixed.

[Bug c++/43313] ICE with non-POD and covariant return thunks

2012-11-07 Thread paolo.carlini at oracle dot com


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



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 CC|gcc-bugs at gcc dot gnu.org |



--- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com 2012-11-07 
20:11:27 UTC ---

Is this still an issue?


[Bug c++/43313] ICE with non-POD and covariant return thunks

2012-11-07 Thread bergner at gcc dot gnu.org


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



--- Comment #6 from Peter Bergner bergner at gcc dot gnu.org 2012-11-07 
22:16:52 UTC ---

Reconfirmed.  It fails with mainline as of today and with the FSF 4.7 branch,

but only with -m32.  It compiles fine with -m64.


[Bug c++/43313] ICE with non-POD and covariant return thunks

2012-11-07 Thread bergner at gcc dot gnu.org


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



--- Comment #7 from Peter Bergner bergner at gcc dot gnu.org 2012-11-07 
23:33:54 UTC ---

Backtrace:



#0  fancy_abort (file=0x113d6b90

/home/bergner/gcc/gcc-fsf-mainline-base/gcc/expr.c, line=7597, 

function=0x113d7158 expand_expr_addr_expr_1(tree_node*, rtx_def*,

machine_mode, expand_modifier, unsigned char)::__FUNCTION__

expand_expr_addr_expr_1)

at /home/bergner/gcc/gcc-fsf-mainline-base/gcc/diagnostic.c:1143

#1  0x1066f4e0 in expand_expr_addr_expr_1 (exp=0xfffb5cd1700,

target=0x0, tmode=SImode, 

modifier=EXPAND_NORMAL, as=0 '\000') at

/home/bergner/gcc/gcc-fsf-mainline-base/gcc/expr.c:7597

#2  0x1066fdd4 in expand_expr_addr_expr (exp=0xfffb5a962e0, target=0x0,

tmode=SImode, 

modifier=EXPAND_NORMAL) at

/home/bergner/gcc/gcc-fsf-mainline-base/gcc/expr.c:7706

#3  0x1066b0dc in expand_expr_real_1 (exp=0xfffb5a962e0, target=0x0,

tmode=VOIDmode, 

modifier=EXPAND_NORMAL, alt_rtl=0x0) at

/home/bergner/gcc/gcc-fsf-mainline-base/gcc/expr.c:10386

#4  0x1066b328 in expand_expr_real (exp=0xfffb5a962e0, target=0x0,

tmode=VOIDmode, 

modifier=EXPAND_NORMAL, alt_rtl=0x0) at

/home/bergner/gcc/gcc-fsf-mainline-base/gcc/expr.c:7866

#5  0x104d8084 in expand_normal (exp=0xfffb5a962e0)

at /home/bergner/gcc/gcc-fsf-mainline-base/gcc/expr.h:450

...





(gdb) p DECL_P (exp)

$22 = true

(gdb) p TREE_ADDRESSABLE (exp)

$23 = 1

(gdb) p ! MEM_P (result)

$24 = true

(gdb) p ! targetm.calls.allocate_stack_slots_for_args()

$25 = false

(gdb) ptree exp

 parm_decl 0xfffb5cd1700 PidIndex

type record_type 0xfffb5c2fb58 CRemapPidIndex type_5 QI

size integer_cst 0xfffb5a92540 constant 8

unit size integer_cst 0xfffb5a92560 constant 1

align 8 symtab 0 alias set -1 canonical type 0xfffb5c2fb58

fields type_decl 0xfffb5b94b78 CRemapPidIndex type record_type

0xfffb5c2fdf8 CRemapPidIndex

nonlocal decl_4 VOID file foo.ii line 4 col 67

align 1 context record_type 0xfffb5c2fb58 CRemapPidIndex result

record_type 0xfffb5c2fb58 CRemapPidIndex

context translation_unit_decl 0xfffb5b90170 D.1

full-name class CRemapPidIndex

X() X(constX) this=(X) n_parents=1 use_template=0 interface-unknown

pointer_to_this pointer_type 0xfffb5cc4398 chain type_decl

0xfffb5b94898 CRemapPidIndex

addressable used QI file foo.ii line 18 col 53 size integer_cst

0xfffb5a92540 8 unit size integer_cst 0xfffb5a92560 1

align 8 context function_decl 0xfffb5c7f400

_ZTch0_h4_N8CPlayout14CreateCarouselE14CRemapPidIndex



(reg/v:QI 125 [ PidIndex ]) arg-type record_type 0xfffb5c2fb58

CRemapPidIndex

incoming-rtl (mem:QI (reg:SI 4 4) [0 S1 A8])


[Bug c++/43313] ICE with non-POD and covariant return thunks

2012-11-07 Thread bergner at gcc dot gnu.org


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



--- Comment #8 from Peter Bergner bergner at gcc dot gnu.org 2012-11-07 
23:39:56 UTC ---

...and the reduced test case I used for the above.  Does any of the above make

sense for anyone?





class CObject {};

class CMsgProc:virtual public CObject { };

template  typename ValueType  class CTypesafeValue { };

class CRemapPidIndex:public CTypesafeValue  short unsigned int  {};

class ICarousel

{

virtual ~ ICarousel ();

};

class IPlayout

{

virtual ICarousel * CreateCarousel (CRemapPidIndex PidIndex) = 0;

};

class CCarousel:public CMsgProc, public ICarousel { };

class CPlayout: public IPlayout 

{

CCarousel *CreateCarousel (CRemapPidIndex PidIndex);

};

CCarousel *CPlayout::CreateCarousel (CRemapPidIndex PidIndex) { }


[Bug c++/43313] ICE with non-POD and covariant return thunks

2010-03-10 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2010-03-10 10:49 ---
Works for me on x86_64 and i?86 with various GCC versions.


-- 


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