[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2020-01-14 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #22 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:000c7a93bdf4040d7d0672fbb9b064eae3d78f5d

commit r10-5955-g000c7a93bdf4040d7d0672fbb9b064eae3d78f5d
Author: Jakub Jelinek 
Date:   Wed Jan 15 00:35:58 2020 +0100

Remove bogus initial lines from test.

2020-01-15  Jakub Jelinek  

PR lto/91576
* g++.dg/lto/odr-8_1.C: Remove bogus initial lines.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2020-01-14 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

Jan Hubicka  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #21 from Jan Hubicka  ---
The type checking ICE is fixed. I hope the other problems mentioned are now
fixed, too (they do not reproduce for me). If not, lets open new PR.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2020-01-14 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #20 from CVS Commits  ---
The master branch has been updated by Jan Hubicka :

https://gcc.gnu.org/g:288c5324bf6e418dd94d718d1619464a4f68ff8e

commit r10-5951-g288c5324bf6e418dd94d718d1619464a4f68ff8e
Author: Jan Hubicka 
Date:   Tue Jan 14 21:45:03 2020 +0100

Compare TREE_ADDRESSABLE and TYPE_MODE when ODR checking types.

PR lto/91576
* ipa-devirt.c (odr_types_equivalent_p): Compare TREE_ADDRESSABLE and
TYPE_MODE.

* testsuite/g++.dg/lto/odr-8_0.C: New testcase.
* testsuite/g++.dg/lto/odr-8_1.C: New testcase.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2020-01-14 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #19 from Martin Liška  ---
> 
> Martin, did you try to get some testsuite scale version of the last testcase?

Sorry, but no. So please apply the patch and we can close it.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2020-01-14 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #18 from Jan Hubicka  ---
OK, other testcases does not reproduce for me. However if they do it seems like
fallout from the change dropping type checking from call statements.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2020-01-14 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #17 from Jan Hubicka  ---
Created attachment 47651
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47651=edit
proposed patch

This is patch I plan to test which fixes the last testcase.  It adds warning
about TREE_ADDRESSABLE mismatch which means that type needs constructing and in
addition TYPE_MODE check. Problem of that one is that we can not give user any
good reason why TYPE_MODEs mismatch and thus I hope it will not trip and
everything should be caught earlier.

There are two problems metled together. Other is the bug with stmt verifier.
Does it still reproduce.

Martin, did you try to get some testsuite scale version of the last testcase?

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2020-01-14 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #16 from Jan Hubicka  ---
OK, i get an ICE because type is not compatible with its main variant. the two
types are:

  constant 384>
unit-size  constant 48>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x76f913f0
fields 
unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x76f91348
attributes 
value 
readonly constant static "cxx11\000">>> fields
 context >
ignored BLK files/file3.ii:47:0 size 
unit-size 
align:8 warn_if_not_align:0 offset_align 128
offset 
bit-offset  context 
chain 
ignored BLK files/file3.ii:47:0
size 
unit-size 
align:64 warn_if_not_align:0 offset_align 128 offset 
bit-offset  context
>> context 
pointer_to_this >

and

  constant 384>
unit-size  constant 48>
align:64 warn_if_not_align:0 symtab:0 alias-set 74 canonical-type
0x76f913f0
fields 
unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set 75 canonical-type
0x76f91348
attributes 
value 
readonly constant static "cxx11\000">>> fields
 context >
ignored QI files/file2.ii:46:0 size 
unit-size 
align:8 warn_if_not_align:0 offset_align 128
offset 
bit-offset  context 
chain 
ignored BLK files/file2.ii:46:0
size 
unit-size 
align:64 warn_if_not_align:0 offset_align 128 offset 
bit-offset  context
>> context >

and the reason for incompatibilty is TYPE_MODE here:

(gdb)  p debug_tree ((tree)0x76f91348)
  constant 8>
unit-size  constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set 75 canonical-type
0x76f91348
attributes 
value 
readonly constant static "cxx11\000">>>
fields  unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set 76 canonical-type
0x76f912a0 attributes  context >
nonlocal QI files/file2.ii:46:475 size 
unit-size 
align:8 warn_if_not_align:0 offset_align 128
offset 
bit-offset  context > context >
$7 = void
(gdb)  p debug_tree ((tree)0x76fc02a0)
  constant 8>
unit-size  constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x76f91348
attributes 
value 
readonly constant static "cxx11\000">>>
fields  unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set 76 canonical-type
0x76f912a0 attributes  context >
nonlocal QI files/file3.ii:47:471 size 
unit-size 
align:8 warn_if_not_align:0 offset_align 128
offset 
bit-offset  context > context >

So they are indeed not compatible. We do not detect any ODR violation on them.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

Martin Liška  changed:

   What|Removed |Added

   Priority|P3  |P1

--- Comment #15 from Martin Liška  ---
@Honza: Can you please take a look?

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-11-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #14 from Martin Liška  ---
Created attachment 47374
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47374=edit
Another test-case

I see very similar error since the problematic revision:

$ g++ -O3 -fPIC file*.ii -flto
...
file4.ii:55:724: internal compiler error: Segmentation fault
   55 |   unsigned int AgreedValueLength() const ;  unsigned int
StaticPrivateKeyLength() const ;  unsigned int StaticPublicKeyLength() const ; 
unsigned int EphemeralPrivateKeyLength() const ;  unsigned int
EphemeralPublicKeyLength() const ;  bool Agree(byte *agreedValue,   const
byte *staticPrivateKey, const byte *ephemeralPrivateKey,   const byte
*staticOtherPublicKey, const byte *ephemeralOtherPublicKey,   bool
validateStaticOtherPublicKey=true) const  {   try   {const
DL_GroupParameters  = GetAbstractGroupParameters();Element
WW = params.DecodeElement(staticOtherPublicKey, validateStaticOtherPublicKey); 
  Element VV = params.DecodeElement(ephemeralOtherPublicKey, true);Integer
s(staticPrivateKey, StaticPrivateKeyLength());Integer
u(ephemeralPrivateKey, StaticPrivateKeyLength());Element V =
params.DecodeElement(ephemeralPrivateKey+StaticPrivateKeyLength(), false);   
const Integer  = params.GetSubgroupOrder();Integer h2 =
Integer::Power2((r.BitCount()+1)/2);Integer e =
((h2+params.ConvertElementToInteger(V)%h2)*s+u) % r;Integer tt = h2 +
params.ConvertElementToInteger(VV) % h2;if (COFACTOR_OPTION::ToEnum() ==
NO_COFACTOR_MULTIPLICTION){ Element P = params.ExponentiateElement(WW,
tt); P = m_groupParameters.MultiplyElements(P, VV); Element R[2];
const Integer e2[2] = {r, e}; params.SimultaneousExponentiate(R, P, e2, 2);
if (!params.IsIdentity(R[0]) || params.IsIdentity(R[1]))  return false;
params.EncodeElement(false, R[1], agreedValue);}else{ const
Integer  = params.GetCofactor(); if (COFACTOR_OPTION::ToEnum() ==
COMPATIBLE_COFACTOR_MULTIPLICTION)  e = ModularArithmetic(r).Divide(e, k); 
   Element P = m_groupParameters.CascadeExponentiate(VV, k*e, WW, k*(e*tt%r)); 
   if (params.IsIdentity(P))  return false; params.EncodeElement(false,
P, agreedValue);}   }   catch (DL_BadElement &)   {return false;   }  
return true;  } private:const DL_GroupParameters &
GetAbstractGroupParameters() const ;  GroupParameters m_groupParameters; }; 
typedef MQV_Domain MQV;  }
  |
   
   
 ^

0xa15d2f crash_signal
../../gcc/toplev.c:328
0x7f4235b4714f ???
   
/usr/src/debug/glibc-2.30-1.2.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xc61640 decl_assembler_name(tree_node*)
../../gcc/tree.c:707
0x825aa5 types_same_for_odr(tree_node const*, tree_node const*)
../../gcc/ipa-devirt.c:360
0x84892e ipa_polymorphic_call_context::get_dynamic_type(tree_node*, tree_node*,
tree_node*, gimple*, unsigned int*)
../../gcc/ipa-polymorphic-call.c:1803
0xb89cf2 eliminate_dom_walker::eliminate_stmt(basic_block_def*,
gimple_stmt_iterator*)
../../gcc/tree-ssa-sccvn.c:5758
0xb8b15d eliminate_dom_walker::before_dom_children(basic_block_def*)
../../gcc/tree-ssa-sccvn.c:5917
0xb8b15d eliminate_dom_walker::before_dom_children(basic_block_def*)
../../gcc/tree-ssa-sccvn.c:5850
0x1186db5 dom_walker::walk(basic_block_def*)
../../gcc/domwalk.c:309
0xb8494b eliminate_with_rpo_vn(bitmap_head*)
../../gcc/tree-ssa-sccvn.c:6095
0xb92502 do_rpo_vn
../../gcc/tree-ssa-sccvn.c:7240
0xb93180 execute
../../gcc/tree-ssa-sccvn.c:7322
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-10-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #13 from Martin Liška  ---
(In reply to Martin Liška from comment #3)
> Created attachment 46781 [details]
> Test-case #2
> 
> Since the same revision I see similar error:
> 
> $ g++ -flto -O2 *.ii 
> 1.ii:14:3: warning: type ‘struct differential3’ violates the C++ One
> Definition Rule [-Wodr]
>14 | } differential3;
>   |   ^
> 2.ii:17:3: note: a different type is defined in another translation unit
>17 | } differential3;
>   |   ^
> 1.ii:12:5: note: the first difference of corresponding definitions is field
> ‘dx’
>12 |   A dx;
>   | ^
> 2.ii:15:5: note: a field of same name but different type is defined in
> another translation unit
>15 |   A dx;
>   | ^
> 1.ii:1:33: note: type name ‘A’ should match type name ‘ccl::A’
> 1 | struct __attribute__((aligned)) A {};
>   | ^
> 2.ii:2:33: note: the incompatible type is defined here
> 2 | struct __attribute__((aligned)) A {
>   | ^
> 1.ii:15:8: warning: type ‘struct C’ violates the C++ One Definition Rule
> [-Wodr]
>15 | struct C {
>   |^
> 2.ii:18:8: note: a different type is defined in another translation unit
>18 | struct C {
>   |^
> 1.ii:16:5: note: the first difference of corresponding definitions is field
> ‘P’
>16 |   A P;
>   | ^
> 2.ii:19:5: note: a field of same name but different type is defined in
> another translation unit
>19 |   A P;
>   | ^
> 1.ii:1:33: note: type name ‘A’ should match type name ‘ccl::A’
> 1 | struct __attribute__((aligned)) A {};
>   | ^
> 2.ii:2:33: note: the incompatible type is defined here
> 2 | struct __attribute__((aligned)) A {
>   | ^
> 1.ii:3:8: warning: type ‘struct B’ violates the C++ One Definition Rule
> [-Wodr]
> 3 | struct B {
>   |^
> 2.ii:6:8: note: a different type is defined in another translation unit
> 6 | struct B {
>   |^
> 1.ii:4:5: note: the first difference of corresponding definitions is field
> ‘diffuse’
> 4 |   A diffuse;
>   | ^
> 2.ii:7:5: note: a field of same name but different type is defined in
> another translation unit
> 7 |   A diffuse;
>   | ^
> 1.ii:1:33: note: type name ‘A’ should match type name ‘ccl::A’
> 1 | struct __attribute__((aligned)) A {};
>   | ^
> 2.ii:2:33: note: the incompatible type is defined here
> 2 | struct __attribute__((aligned)) A {
>   | ^
> lto1: error: ‘TYPE_CANONICAL’ is not compatible
>   size  bitsizetype> constant 17664>
> unit-size  sizetype> constant 2208>
> user align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
> 0x7fbd73a87498
> fields  type  PathState>
> BLK
> size 
> unit-size 
> align:32 warn_if_not_align:0 symtab:0 alias-set -1
> structural-equality domain >
> nonlocal BLK 1.ii:47:13 size 
> unit-size 
> align:32 warn_if_not_align:0 offset_align 128
> offset 
> bit-offset  context
> 
> chain  0x7fbd73c955e8 int>
> nonlocal SI 1.ii:48:7
> size 
> unit-size 
> align:32 warn_if_not_align:0 offset_align 128 offset
>  bit-offset 
> context  chain
> >> context  ccl>>
>   size  bitsizetype> constant 17664>
> unit-size  sizetype> constant 2208>
> user align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
> 0x7fbd73a87498
> fields  type  PathState>
> BLK
> size 
> unit-size 
> align:32 warn_if_not_align:0 symtab:0 alias-set -1
> structural-equality domain >
> nonlocal BLK 2.ii:50:13 size 
> unit-size 
> align:32 warn_if_not_align:0 offset_align 128
> offset 
> bit-offset  context
> 
> chain  0x7fbd73c955e8 int>
> nonlocal SI 2.ii:51:7
> size 
> unit-size 
> align:32 warn_if_not_align:0 offset_align 128 offset
>  bit-offset 
> context  chain
> >> context  ccl>
> pointer_to_this >
> lto1: internal compiler error: ‘verify_type’ failed
> 0xf5a148 verify_type(tree_node const*)
>   ../../gcc/tree.c:14775
> 0x7ec407 lto_fixup_state
>   ../../gcc/lto/lto-common.c:2582
> 0x7f6f84 lto_fixup_decls
>   ../../gcc/lto/lto-common.c:2613
> 0x7f6f84 read_cgraph_and_symbols(unsigned int, char const**)
>   ../../gcc/lto/lto-common.c:2848
> 0x7dd692 lto_main()
>   ../../gcc/lto/lto.c:616
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See  for instructions.
> lto-wrapper: fatal error: g++ returned 1 exit status
> compilation terminated.
> 

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-10-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #12 from Martin Liška  ---
(In reply to Jan Hubicka from comment #10)
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576
> probably just need -fno-inline-functions and --param
> inline-insns-auto-O2= to reproduce again?
> 
> Honza

Apparently I can't reproduce that again :/

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-10-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #11 from Martin Liška  ---
(In reply to David Binderman from comment #7)
> After much slow reduction, the reduced C++ source code seems
> to be
> 
> class b;
> struct c {
>   using aj = b *;
> };
> struct d {
>   using aj = c::aj;
> };
> struct f {
>   using aj = d::aj;
> };
> template  f::aj ap(ao);
> template  class g {
> public:
>   aq begin();
>   aq end();
> };
> class av {
> public:
>   virtual int *aw(unsigned long);
> };
> template  struct h {
>   long ba;
>   av bb;
>   void bc() { ba = long((>*ay)(1)); }
> };
> using bd = h;
> class b {
>   struct i {
> bd bf;
> void bg() { bf.bc(); }
>   };
> 
> public:
>   using bh = int *;
>   using bi = g;
>   i bj;
>   bi bases() { bj.bg(); }
> };
> class j {
>   virtual bool bl(const int *, unsigned, int, int, int);
> };
> class k : j {
>   bool bl(const int *l, unsigned, int, int, int) {
> auto e = ap(l);
> for (int a : e->bases())
>   ;
>   }
> };
> void bp() { k(); }

This is dup of PR92201 which is fixed now.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-10-30 Thread hubicka at ucw dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #10 from Jan Hubicka  ---
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576
probably just need -fno-inline-functions and --param inline-insns-auto-O2= to reproduce again?

Honza

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-10-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #9 from Martin Liška  ---
(In reply to Martin Liška from comment #2)
> Created attachment 46775 [details]
> Reduced source files
> 
> $ gcc -c -flto 5.i -o 5.o && c++ -O2 -flto=16 -shared -o zynaddsubfx 1.ii
> 2.ii 3.ii 4.ii 5.o
> ...
> 1.ii: In member function ‘activeDesc’:
> 1.ii:37:31: error: invalid conversion in gimple call
>37 | NotePool::constActiveDescIter NotePool::activeDesc() const {
>   |   ^
> struct constActiveDescIter
> 
> struct activeDescIter
> 
> # .MEM_4 = VDEF <.MEM_3(D)>
> retval.0 = activeDesc (this_2(D)); [tail call]
> during GIMPLE pass: fixup_cfg
> 1.ii:37:31: internal compiler error: verify_gimple failed
> 0xcd4991 verify_gimple_in_cfg(function*, bool)
>   /home/marxin/Programming/gcc/gcc/tree-cfg.c:5427
> 0xbb3cef execute_function_todo
>   /home/marxin/Programming/gcc/gcc/passes.c:1983
> 0xbb4a9e execute_todo
>   /home/marxin/Programming/gcc/gcc/passes.c:2037
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See  for instructions.
> make: *** [/tmp/cc4IuhNp.mk:5: /tmp/zynaddsubfx.Q6TfM0.ltrans1.ltrans.o]
> Error 1
> make: *** Waiting for unfinished jobs
> lto-wrapper: fatal error: make returned 2 exit status
> compilation terminated.
> /usr/bin/ld: error: lto-wrapper failed
> collect2: error: ld returned 1 exit status

This issue is gone since r276416.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-10-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #8 from Martin Liška  ---
Honza?

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-10-11 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #7 from David Binderman  ---
After much slow reduction, the reduced C++ source code seems
to be

class b;
struct c {
  using aj = b *;
};
struct d {
  using aj = c::aj;
};
struct f {
  using aj = d::aj;
};
template  f::aj ap(ao);
template  class g {
public:
  aq begin();
  aq end();
};
class av {
public:
  virtual int *aw(unsigned long);
};
template  struct h {
  long ba;
  av bb;
  void bc() { ba = long((>*ay)(1)); }
};
using bd = h;
class b {
  struct i {
bd bf;
void bg() { bf.bc(); }
  };

public:
  using bh = int *;
  using bi = g;
  i bj;
  bi bases() { bj.bg(); }
};
class j {
  virtual bool bl(const int *, unsigned, int, int, int);
};
class k : j {
  bool bl(const int *l, unsigned, int, int, int) {
auto e = ap(l);
for (int a : e->bases())
  ;
  }
};
void bp() { k(); }

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-10-10 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #6 from David Binderman  ---
Bug seems to start sometime between revision 276550 and 276650.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-10-10 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #5 from David Binderman  ---
Created attachment 47013
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47013=edit
gzipped C++ source code

The attached C++ source code compiled with -std=c++17. 

No lto required, so might be different bug.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-10-09 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

David Binderman  changed:

   What|Removed |Added

 CC||dcb314 at hotmail dot com

--- Comment #4 from David Binderman  ---
I am seeing something similar:

/usr/include/clang/AST/ExternalASTSource.h:400:6: error: invalid conversion in
gimple call
  400 |   T* get(ExternalASTSource *Source) const {
  |  ^~~
struct CXXBaseSpecifier *

int

_6 = _3 (Source, _5);
/usr/include/clang/AST/ExternalASTSource.h:400:6: internal compiler error:
'verify_gimple' failed
0x1010dfd verify_gimple_in_seq(gimple*)
../../trunk/gcc/tree-cfg.c:5079
0xd40ade gimplify_body(tree_node*, bool)
../../trunk/gcc/gimplify.c:14439
0xd40cc7 gimplify_function_tree(tree_node*)
../../trunk/gcc/gimplify.c:14529
0xba7c37 cgraph_node::analyze()
../../trunk/gcc/cgraphunit.c:667

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-08-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #3 from Martin Liška  ---
Created attachment 46781
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46781=edit
Test-case #2

Since the same revision I see similar error:

$ g++ -flto -O2 *.ii 
1.ii:14:3: warning: type ‘struct differential3’ violates the C++ One Definition
Rule [-Wodr]
   14 | } differential3;
  |   ^
2.ii:17:3: note: a different type is defined in another translation unit
   17 | } differential3;
  |   ^
1.ii:12:5: note: the first difference of corresponding definitions is field
‘dx’
   12 |   A dx;
  | ^
2.ii:15:5: note: a field of same name but different type is defined in another
translation unit
   15 |   A dx;
  | ^
1.ii:1:33: note: type name ‘A’ should match type name ‘ccl::A’
1 | struct __attribute__((aligned)) A {};
  | ^
2.ii:2:33: note: the incompatible type is defined here
2 | struct __attribute__((aligned)) A {
  | ^
1.ii:15:8: warning: type ‘struct C’ violates the C++ One Definition Rule
[-Wodr]
   15 | struct C {
  |^
2.ii:18:8: note: a different type is defined in another translation unit
   18 | struct C {
  |^
1.ii:16:5: note: the first difference of corresponding definitions is field ‘P’
   16 |   A P;
  | ^
2.ii:19:5: note: a field of same name but different type is defined in another
translation unit
   19 |   A P;
  | ^
1.ii:1:33: note: type name ‘A’ should match type name ‘ccl::A’
1 | struct __attribute__((aligned)) A {};
  | ^
2.ii:2:33: note: the incompatible type is defined here
2 | struct __attribute__((aligned)) A {
  | ^
1.ii:3:8: warning: type ‘struct B’ violates the C++ One Definition Rule [-Wodr]
3 | struct B {
  |^
2.ii:6:8: note: a different type is defined in another translation unit
6 | struct B {
  |^
1.ii:4:5: note: the first difference of corresponding definitions is field
‘diffuse’
4 |   A diffuse;
  | ^
2.ii:7:5: note: a field of same name but different type is defined in another
translation unit
7 |   A diffuse;
  | ^
1.ii:1:33: note: type name ‘A’ should match type name ‘ccl::A’
1 | struct __attribute__((aligned)) A {};
  | ^
2.ii:2:33: note: the incompatible type is defined here
2 | struct __attribute__((aligned)) A {
  | ^
lto1: error: ‘TYPE_CANONICAL’ is not compatible
  constant 17664>
unit-size  constant 2208>
user align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fbd73a87498
fields 
BLK
size 
unit-size 
align:32 warn_if_not_align:0 symtab:0 alias-set -1
structural-equality domain >
nonlocal BLK 1.ii:47:13 size 
unit-size 
align:32 warn_if_not_align:0 offset_align 128
offset 
bit-offset  context 
chain 
nonlocal SI 1.ii:48:7
size 
unit-size 
align:32 warn_if_not_align:0 offset_align 128 offset  bit-offset  context
 chain >> context >
  constant 17664>
unit-size  constant 2208>
user align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fbd73a87498
fields 
BLK
size 
unit-size 
align:32 warn_if_not_align:0 symtab:0 alias-set -1
structural-equality domain >
nonlocal BLK 2.ii:50:13 size 
unit-size 
align:32 warn_if_not_align:0 offset_align 128
offset 
bit-offset  context 
chain 
nonlocal SI 2.ii:51:7
size 
unit-size 
align:32 warn_if_not_align:0 offset_align 128 offset  bit-offset  context
 chain >> context 
pointer_to_this >
lto1: internal compiler error: ‘verify_type’ failed
0xf5a148 verify_type(tree_node const*)
../../gcc/tree.c:14775
0x7ec407 lto_fixup_state
../../gcc/lto/lto-common.c:2582
0x7f6f84 lto_fixup_decls
../../gcc/lto/lto-common.c:2613
0x7f6f84 read_cgraph_and_symbols(unsigned int, char const**)
../../gcc/lto/lto-common.c:2848
0x7dd692 lto_main()
../../gcc/lto/lto.c:616
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-08-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

--- Comment #2 from Martin Liška  ---
Created attachment 46775
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46775=edit
Reduced source files

$ gcc -c -flto 5.i -o 5.o && c++ -O2 -flto=16 -shared -o zynaddsubfx 1.ii 2.ii
3.ii 4.ii 5.o
...
1.ii: In member function ‘activeDesc’:
1.ii:37:31: error: invalid conversion in gimple call
   37 | NotePool::constActiveDescIter NotePool::activeDesc() const {
  |   ^
struct constActiveDescIter

struct activeDescIter

# .MEM_4 = VDEF <.MEM_3(D)>
retval.0 = activeDesc (this_2(D)); [tail call]
during GIMPLE pass: fixup_cfg
1.ii:37:31: internal compiler error: verify_gimple failed
0xcd4991 verify_gimple_in_cfg(function*, bool)
/home/marxin/Programming/gcc/gcc/tree-cfg.c:5427
0xbb3cef execute_function_todo
/home/marxin/Programming/gcc/gcc/passes.c:1983
0xbb4a9e execute_todo
/home/marxin/Programming/gcc/gcc/passes.c:2037
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make: *** [/tmp/cc4IuhNp.mk:5: /tmp/zynaddsubfx.Q6TfM0.ltrans1.ltrans.o] Error
1
make: *** Waiting for unfinished jobs
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-08-28 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |10.0

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-08-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

Martin Liška  changed:

   What|Removed |Added

   Keywords||needs-reduction

--- Comment #1 from Martin Liška  ---
Ok, I've got 5 pre-processed source files, so I guess I can reduce it.

[Bug lto/91576] [10 Regression] error: invalid conversion in gimple call since r272749

2019-08-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91576

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-08-28
  Known to work||9.2.0
   Assignee|unassigned at gcc dot gnu.org  |hubicka at gcc dot 
gnu.org
 Ever confirmed|0   |1
  Known to fail||10.0