[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-11-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

--- Comment #13 from Richard Biener  ---
Author: rguenth
Date: Wed Nov 18 15:23:48 2015
New Revision: 230550

URL: https://gcc.gnu.org/viewcvs?rev=230550&root=gcc&view=rev
Log:
2015-11-18  Richard Biener  

Backport from mainline
2015-11-07  Jan Hubicka  

PR ipa/68057
PR ipa/68220
* ipa-polymorphic-call.c
(ipa_polymorphic_call_context::restrict_to_inner_type): Fix ordering
issue when offset is out of range.
(contains_type_p): Fix out of range check, clear dynamic flag.

* g++.dg/torture/pr68220.C: New testcase.
* g++.dg/lto/pr68057_0.C: Likewise.
* g++.dg/lto/pr68057_1.C: Likewise.

2015-10-23  Jan Hubicka  

PR ipa/pr67600
* ipa-polymorphic-call.c
(ipa_polymorphic_call_context::get_dynamic_type): Do not confuse
instance offset with offset of outer type.

* g++.dg/torture/pr67600.C: New testcase.

2015-10-12  Richard Biener  

PR ipa/67783
* ipa-inline-analysis.c (estimate_function_body_sizes): Re-add
code that analyzes IVs on each stmt but in a cheaper way avoiding
quadratic behavior.

2015-10-11  Jan Hubicka  

PR ipa/67056
* ipa-polymorphic-call.c (possible_placement_new): If cur_offset
is negative we don't know the type.
(check_stmt_for_type_change): Skip constructors of non-polymorphic
types as those won't help devirutalization.

* g++.dg/ipa/pr67056.C: New testcase.

2015-08-11  Manuel López-Ibáñez  

PR c/66098
PR c/66711
* diagnostic.c (diagnostic_classify_diagnostic): Take -Werror into
account when deciding what was the command-line status.

* gcc.dg/pragma-diag-3.c: New test.
* gcc.dg/pragma-diag-4.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/ipa/pr67056.C
branches/gcc-5-branch/gcc/testsuite/g++.dg/lto/pr68057_0.C
branches/gcc-5-branch/gcc/testsuite/g++.dg/lto/pr68057_1.C
branches/gcc-5-branch/gcc/testsuite/g++.dg/torture/pr67600.C
branches/gcc-5-branch/gcc/testsuite/g++.dg/torture/pr68220.C
branches/gcc-5-branch/gcc/testsuite/gcc.dg/pragma-diag-3.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/pragma-diag-4.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/diagnostic.c
branches/gcc-5-branch/gcc/ipa-inline-analysis.c
branches/gcc-5-branch/gcc/ipa-polymorphic-call.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-11-06 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

Jan Hubicka  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Jan Hubicka  ---
Fixed.

[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-11-06 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

--- Comment #11 from Jan Hubicka  ---
Author: hubicka
Date: Fri Nov  6 16:04:38 2015
New Revision: 229859

URL: https://gcc.gnu.org/viewcvs?rev=229859&root=gcc&view=rev
Log:

PR ipa/68057
PR ipa/68220
* ipa-polymorphic-call.c
(ipa_polymorphic_call_context::restrict_to_inner_type): Fix ordering
issue when offset is out of range.
(contains_type_p): Fix out of range check, clear dynamic flag.
* g++.dg/lto/pr68057_0.C: New testcase.
* g++.dg/lto/pr68057_1.C: New testcase.
* g++.dg/torture/pr68220.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/lto/pr68057_0.C
trunk/gcc/testsuite/g++.dg/lto/pr68057_1.C
trunk/gcc/testsuite/g++.dg/torture/pr68220.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-polymorphic-call.c
trunk/gcc/testsuite/ChangeLog

[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-11-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

--- Comment #10 from Jan Hubicka  ---
Hmm, the patch does not fix this testcase. I will analyze it.

[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-11-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

--- Comment #9 from Jan Hubicka  ---
Patch posted to PR68220

[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-11-05 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

Jan Hubicka  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #8 from Jan Hubicka  ---
I will take a look. Noticed it only now.
Honza

[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-11-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

--- Comment #7 from Richard Biener  ---
Honza, can you work on this please?  It blocks backporting the devirt
wrong-code fix.

[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-10-24 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

--- Comment #6 from Markus Trippelsdorf  ---
BTW there is a big binary size increase for SPEC2000/2006 apps using flto,
see https://vmakarov.fedorapeople.org/spec/


[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-10-23 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||trippels at gcc dot gnu.org

--- Comment #5 from Markus Trippelsdorf  ---
markus@x4 test % cat 1.ii
struct SPxPricer;
struct SoPlex {
  virtual void setPricer(SPxPricer *);
};
struct SPxPricer {
  virtual void load(SoPlex *);
};
struct SLUFactor {
  SLUFactor();
  virtual ~SLUFactor();
};
struct SPxSolver : SoPlex {
  SPxPricer pr;
  SLUFactor slu;
  SPxSolver();
};
struct A : SPxSolver {};
A a;

void SoPlex::setPricer(SPxPricer *p1) { p1->load(this); }


markus@x4 test % cat 2.ii
struct SPxPricer;
struct SoPlex {
  virtual void setPricer(SPxPricer *);
};
struct SPxPricer {
  virtual void load(SoPlex *);
};
struct SLUFactor {
  SLUFactor();
  virtual ~SLUFactor();
};
struct SPxSolver : SoPlex {
  SPxPricer pr;
  SLUFactor slu;
  SPxSolver();
};
SPxSolver::SPxSolver() { setPricer(&pr); }


markus@x4 test % g++ -r -nostdlib -O2 -flto 1.ii 2.ii
lto1: internal compiler error: in record_target_from_binfo, at
ipa-devirt.c:2599


[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-10-23 Thread miyuki at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

--- Comment #4 from Mikhail Maltsev  ---
Created attachment 36570
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36570&action=edit
reproducer

Compile like this:
/opt/gcc-6.0.0/bin/g++ -O3 -flto tu{1,2,3}.cc

lto1: internal compiler error: in record_target_from_binfo, at
ipa-devirt.c:2599
0x80492d record_target_from_binfo
/home/miyuki/gcc/src/gcc/ipa-devirt.c:2599
0x804405 record_target_from_binfo
/home/miyuki/gcc/src/gcc/ipa-devirt.c:2640
0x804e44 possible_polymorphic_call_targets_1
/home/miyuki/gcc/src/gcc/ipa-devirt.c:2687
0x80b8fc possible_polymorphic_call_targets(tree_node*, long,
ipa_polymorphic_call_context, bool*, void**, bool)
/home/miyuki/gcc/src/gcc/ipa-devirt.c:3216
0x80d1fc try_speculative_devirtualization(tree_node*, long,
ipa_polymorphic_call_context)
/home/miyuki/gcc/src/gcc/ipa-devirt.c:3576
0x109aec9 ipa_get_indirect_edge_target_1
/home/miyuki/gcc/src/gcc/ipa-cp.c:2142
0x81fb52 estimate_edge_devirt_benefit
/home/miyuki/gcc/src/gcc/ipa-inline-analysis.c:3048
0x81ff5b estimate_edge_size_and_time
<...>

I did not preserve validity, i.e. compiling without optimization gives link
error:
tu3.cc:(.text._ZN9SPxPricerC2Ev[_ZN9SPxPricerC5Ev]+0x9): undefined reference to
`vtable for SPxPricer'
(because of missing definition for SPxPricer::load).


[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-10-23 Thread miyuki at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

Mikhail Maltsev  changed:

   What|Removed |Added

 CC||miyuki at gcc dot gnu.org

--- Comment #3 from Mikhail Maltsev  ---
This also started showing up in my x86_64 builds with the following options:

g++ -w  -Ofast -march=haswell -mtune=haswell -flto=12   -DSPEC_CPU_LP64
-std=c++98 -fprofile-generate <...> -o soplex

I'll try to reduce the testcase.


[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-10-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-10-23
 Ever confirmed|0   |1

--- Comment #2 from H.J. Lu  ---
It was caused by r229148.


[Bug ipa/68057] [6 Regression] 450.soplex in SPEC CPU 2006 failed to build

2015-10-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68057

Richard Biener  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org
Version|5.3.0   |6.0
 Blocks||67056
   Target Milestone|--- |6.0

--- Comment #1 from Richard Biener  ---
Honza, probably caused by your devirt fix?


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67056
[Bug 67056] [5 regression] Wrong code generated