public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap
@ 2015-07-08  7:44 trippels at gcc dot gnu.org
  2015-07-08  7:53 ` [Bug bootstrap/66801] " rguenth at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-08  7:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66801
           Summary: [6 Regression] gcc miscompiled during PGO/LTO
                    bootstrap
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

On ppc64le gcc gets miscompiled during stagefeedback phase:

 % /home/trippels/gcc_build_dir_/./gcc/xgcc --version
[1]    53644 segmentation fault (core dumped) 
/home/trippels/gcc_build_dir_/./gcc/xgcc --version

 % ../gcc/configure --with-cpu=power8 --disable-libstdcxx-pch --disable-libvtv
--disable-libitm --disable-libcilkrts --disable-libssp --disable-libgomp
--disable-werror --disable-multilib --enable-languages=c,c++
--enable-checking=release --with-build-config=bootstrap-lto
 % make -j120 BOOT_CFLAGS="-mcpu=power8 -O3 -pipe" STAGE1_CFLAGS="-mcpu=power8
-O3 -pipe" CFLAGS_FOR_TARGET="-mcpu=power8 -O3 -pipe"
CXXFLAGS_FOR_TARGET="-mcpu=power8 -O3 -pipe" profiledbootstrap


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
@ 2015-07-08  7:53 ` rguenth at gcc dot gnu.org
  2015-07-08  9:38 ` trippels at gcc dot gnu.org
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08  7:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |6.0


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
  2015-07-08  7:53 ` [Bug bootstrap/66801] " rguenth at gcc dot gnu.org
@ 2015-07-08  9:38 ` trippels at gcc dot gnu.org
  2015-07-08 10:24 ` trippels at gcc dot gnu.org
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-08  9:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Started with r225504.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
  2015-07-08  7:53 ` [Bug bootstrap/66801] " rguenth at gcc dot gnu.org
  2015-07-08  9:38 ` trippels at gcc dot gnu.org
@ 2015-07-08 10:24 ` trippels at gcc dot gnu.org
  2015-07-08 11:13 ` rguenth at gcc dot gnu.org
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-08 10:24 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|ppc64le                     |
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-07-08
     Ever confirmed|0                           |1

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Also happens on x86_64.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-07-08 10:24 ` trippels at gcc dot gnu.org
@ 2015-07-08 11:13 ` rguenth at gcc dot gnu.org
  2015-07-08 11:41 ` trippels at gcc dot gnu.org
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08 11:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmpf.  Can't see why it should - I suppose the only "questionable" hunk _may_
be


+      /* Visit the statement only if its block is marked executable.
+         If it is not executable then it will be visited when we simulate
+        all statements in the block as soon as an incoming edge gets
+        marked executable.  */
+      if (!bitmap_bit_p (executable_blocks, bb->index))
+       {
+         if (dump_file && (dump_flags & TDF_DETAILS))
+           {
+             fprintf (dump_file, "\nDropping statement from SSA worklist: ");
+             print_gimple_stmt (dump_file, stmt, 0, dump_flags);
+           }
+         continue;
...
+      simulate_stmt (stmt);

-      /* PHI nodes are always visited, regardless of whether or not
-        the destination block is executable.  Otherwise, visit the
-        statement only if its block is marked executable.  */
-      if (gimple_code (stmt) == GIMPLE_PHI
-         || bitmap_bit_p (executable_blocks, bb->index))
-       simulate_stmt (stmt);
+      return true;

Thus, does the following fix it? (I'd have to try reproducing it first)

Index: gcc/tree-ssa-propagate.c
===================================================================
--- gcc/tree-ssa-propagate.c    (revision 225534)
+++ gcc/tree-ssa-propagate.c    (working copy)
@@ -444,7 +444,8 @@ process_ssa_edge_worklist (vec<gimple> *
          If it is not executable then it will be visited when we simulate
         all statements in the block as soon as an incoming edge gets
         marked executable.  */
-      if (!bitmap_bit_p (executable_blocks, bb->index))
+      if (gimple_code (stmt) != GIMPLE_PHI
+         && !bitmap_bit_p (executable_blocks, bb->index))
        {
          if (dump_file && (dump_flags & TDF_DETAILS))
            {

not that I have an idea _why_ it should fix something.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-07-08 11:13 ` rguenth at gcc dot gnu.org
@ 2015-07-08 11:41 ` trippels at gcc dot gnu.org
  2015-07-08 11:43 ` rguenther at suse dot de
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-08 11:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
The patch doesn't help, unfortunately.

By the way compiling gimple-match.c with -fprofile-generate takes
almost 4 minutes on gcc112.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-07-08 11:41 ` trippels at gcc dot gnu.org
@ 2015-07-08 11:43 ` rguenther at suse dot de
  2015-07-08 12:22 ` rguenth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenther at suse dot de @ 2015-07-08 11:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 8 Jul 2015, trippels at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66801
> 
> --- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
> The patch doesn't help, unfortunately.

Ok, then we're hitting a latent bug which is exposed by different
(better) iteration order :(

> By the way compiling gimple-match.c with -fprofile-generate takes
> almost 4 minutes on gcc112.

Yeah, I know.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-07-08 11:43 ` rguenther at suse dot de
@ 2015-07-08 12:22 ` rguenth at gcc dot gnu.org
  2015-07-08 14:22 ` rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08 12:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok, so the only code-gen difference possible is due to match.pd patterns
applying/not applying because of the changed iteration order making lattice
values final at different times.

Thus I suspect a latent bug in a match.pd pattern.  Which means to possibly
"bisect" those?

I'm now first trying to reproduce.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2015-07-08 14:22 ` rguenth at gcc dot gnu.org
@ 2015-07-08 14:22 ` rguenth at gcc dot gnu.org
  2015-07-08 14:25 ` trippels at gcc dot gnu.org
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08 14:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok, I can't reproduce it on x86_64 with

--enable-languages=c --disable-multilib --with-build-config=bootstrap-lto
--disable-werror

make -j8 profiledbootstrap

on r225546.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-07-08 12:22 ` rguenth at gcc dot gnu.org
@ 2015-07-08 14:22 ` rguenth at gcc dot gnu.org
  2015-07-08 14:22 ` rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08 14:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, you used release checking...  damn.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2015-07-08 14:22 ` rguenth at gcc dot gnu.org
@ 2015-07-08 14:25 ` trippels at gcc dot gnu.org
  2015-07-08 15:06 ` trippels at gcc dot gnu.org
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-08 14:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #9)
> Ah, you used release checking...  damn.

Also note the various FLAGS that I use in comment0. 
Both PGO and LTO are needed. 
PGO alone is fine, LTO alone is fine and bootstrap-O3 alone is also fine.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2015-07-08 14:25 ` trippels at gcc dot gnu.org
@ 2015-07-08 15:06 ` trippels at gcc dot gnu.org
  2015-07-09  7:37 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-08 15:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
../gcc/configure --disable-libstdcxx-pch --disable-libvtv --disable-libitm
--disable-libcilkrts --disable-libssp --disable-libgomp --disable-werror
--disable-multilib --enable-languages=c,c++ --enable-checking=release
--with-build-config="bootstrap-lto bootstrap-O3"

make profiledbootstrap

is enough to reproduce. 
(gimple-match.c takes over 15 minutes to compile with this config).


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2015-07-08 15:06 ` trippels at gcc dot gnu.org
@ 2015-07-09  7:37 ` rguenth at gcc dot gnu.org
  2015-07-09  8:32 ` trippels at gcc dot gnu.org
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-09  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
Also fails for HJ https://gcc.gnu.org/ml/gcc-regression/2015-07/msg00224.html,
from what I can see it's plain LTO/FDO bootstrap (but with checking enabled
and multilibs).

I suppose using LTO really means the bug might be hard to trigger.

Now trying your config.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2015-07-09  7:37 ` rguenth at gcc dot gnu.org
@ 2015-07-09  8:32 ` trippels at gcc dot gnu.org
  2015-07-09  8:44 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-09  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #12)
> Also fails for HJ
> https://gcc.gnu.org/ml/gcc-regression/2015-07/msg00224.html,
> from what I can see it's plain LTO/FDO bootstrap (but with checking enabled
> and multilibs).

H.J.'s config was failing before r225504 went in, so it must be a 
different issue: https://gcc.gnu.org/ml/gcc-regression/2015-07/msg00014.html


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2015-07-09  8:32 ` trippels at gcc dot gnu.org
@ 2015-07-09  8:44 ` rguenth at gcc dot gnu.org
  2015-07-09 10:27 ` trippels at gcc dot gnu.org
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-09  8:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmpf, bootstrap passed on x86_64-linux with

/space/rguenther/src/svn/trunk2/configure --disable-libstdcxx-pch
--disable-libvtv --disable-libitm --disable-libcilkrts --disable-libssp
--disable-libgomp --disable-werror --disable-multilib --enable-languages=c,c++
--enable-checking=release --with-build-config=bootstrap-lto bootstrap-O3
make -j12 profiledbootstrap

(r225542)


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2015-07-09  8:44 ` rguenth at gcc dot gnu.org
@ 2015-07-09 10:27 ` trippels at gcc dot gnu.org
  2015-07-09 11:15 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-09 10:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
For x86_64 additional --with-arch=native (sandybridge) is needed during
configuration.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2015-07-09 10:27 ` trippels at gcc dot gnu.org
@ 2015-07-09 11:15 ` rguenth at gcc dot gnu.org
  2015-07-09 12:20 ` trippels at gcc dot gnu.org
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-09 11:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
So, if it is related to vectorization (if I ever get to reproduce it I'll try
-fno-tree-vectorize) then it might be the

/* If arg0 is derived from the address of an object or function, we may
   be able to fold this expression using the object or function's
   alignment.  */
(simplify
 (bit_and (convert? @0) INTEGER_CST@1)
 (if (POINTER_TYPE_P (TREE_TYPE (@0))
      && tree_nop_conversion_p (type, TREE_TYPE (@0)))
  (with
   {
     unsigned int align;
     unsigned HOST_WIDE_INT bitpos;
     get_pointer_alignment_1 (@0, &align, &bitpos);
   }
   (if (wi::ltu_p (@1, align / BITS_PER_UNIT))
    { wide_int_to_tree (type, wi::bit_and (@1, bitpos / BITS_PER_UNIT)); }))))

pattern somehow going wild (from triggering within CCP itself?).  Thus as
third step I'll try disabling that one.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2015-07-09 11:15 ` rguenth at gcc dot gnu.org
@ 2015-07-09 12:20 ` trippels at gcc dot gnu.org
  2015-07-12  9:07 ` trippels at gcc dot gnu.org
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-09 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Nothing helps; neither -fno-ipa-cp-alignment, nor -fno-tree-vectorize,
nor disabling the pattern above.


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2015-07-09 12:20 ` trippels at gcc dot gnu.org
@ 2015-07-12  9:07 ` trippels at gcc dot gnu.org
  2015-07-12 10:24 ` trippels at gcc dot gnu.org
  2015-08-12  8:58 ` trippels at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-12  9:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
 % gdb --args /home/trippels/gcc_build_dir_/./gcc/xgcc --version
Reading symbols from /home/trippels/gcc_build_dir_/./gcc/xgcc...done.
(gdb) run
Starting program: /home/trippels/gcc_build_dir_/gcc/xgcc --version

Program received signal SIGSEGV, Segmentation fault.
pp_format (pp=0x0, text=0x3fffffffe390) at ../../gcc/gcc/pretty-print.c:282
282       output_buffer *buffer = pp_buffer (pp);
(gdb) bt
#0  pp_format (pp=0x0, text=0x3fffffffe390) at ../../gcc/gcc/pretty-print.c:282
#1  0x000000001002f02c in diagnostic_report_diagnostic (context=0x101aa6e0
<_ZL25global_diagnostic_context.lto_priv.201>, diagnostic=0x3fffffffe390)
    at ../../gcc/gcc/diagnostic.c:915
#2  0x000000001000b768 in internal_error(char const*, ...) (gmsgid=0x10136620
"in %s, at %s:%d") at ../../gcc/gcc/diagnostic.c:1272
#3  0x000000001000b6f4 in fancy_abort(char const*, int, char const*)
(file=<optimized out>, line=<optimized out>, function=<optimized out>)
    at ../../gcc/gcc/diagnostic.c:1340
#4  0x0000000010027174 in prune_options (decoded_options_count=0x3fffffffe6b0,
decoded_options=0x3fffffffe6a8) at ../../gcc/gcc/opts-common.c:848
#5  decode_cmdline_options_to_array(unsigned int, char const**, unsigned int,
cl_decoded_option**, unsigned int*) [clone .constprop.43] (argc=<optimized
out>, 
    argv=0x3fffffffeba8, decoded_options=0x3fffffffe6a8,
decoded_options_count=0x3fffffffe6b0, lang_mask=524288) at
../../gcc/gcc/opts-common.c:794
#6  0x00000000100211d0 in decode_argv (argv=0x3fffffffeba8, argc=2,
this=0x3fffffffe6a0) at ../../gcc/gcc/gcc.c:7015
#7  main (argv=<optimized out>, argc=<optimized out>, this=0x3fffffffe6a0) at
../../gcc/gcc/gcc.c:6950
#8  main (argc=<optimized out>, argv=0x3fffffffeba8) at
../../gcc/gcc/gcc-main.c:45


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2015-07-12  9:07 ` trippels at gcc dot gnu.org
@ 2015-07-12 10:24 ` trippels at gcc dot gnu.org
  2015-08-12  8:58 ` trippels at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-12 10:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Looks like -fbranch-probabilities is causing the issue.
It it gcc.o that gets miscompiled.

The following works (adding -fno-branch-probabilities):

trippels@gcc2-power8 gcc % /home/trippels/gcc_build_dir_/./prev-gcc/xg++
-B/home/trippels/gcc_build_dir_/./prev-gcc/
-B/usr/local/powerpc64le-unknown-linux-gnu/bin/ -nostdinc++
-B/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
-I/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/include/powerpc64le-unknown-linux-gnu
-I/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/include
-I/home/trippels/gcc/libstdc++-v3/libsupc++
-L/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/src/.libs
-L/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
-fno-PIE -c -DSTANDARD_STARTFILE_PREFIX=\"../../../\"
-DSTANDARD_EXEC_PREFIX=\"/usr/local/lib/gcc/\"
-DSTANDARD_LIBEXEC_PREFIX=\"/usr/local/libexec/gcc/\"
-DDEFAULT_TARGET_VERSION=\"6.0.0\"
-DDEFAULT_REAL_TARGET_MACHINE=\"powerpc64le-unknown-linux-gnu\"
-DDEFAULT_TARGET_MACHINE=\"powerpc64le-unknown-linux-gnu\"
-DSTANDARD_BINDIR_PREFIX=\"/usr/local/bin/\"
-DTOOLDIR_BASE_PREFIX=\"../../../../\" -DACCEL_DIR_SUFFIX=\"\"
-DENABLE_SHARED_LIBGCC -DCONFIGURE_SPECS="\"\"" -O3 -g -flto=jobserver
-frandom-seed=1 -fprofile-use -fno-branch-probabilities -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/.
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd
-I../libdecnumber -I../../gcc/gcc/../libbacktrace -o gcc.o -MT gcc.o -MMD -MP
-MF ./.deps/gcc.TPo ../../gcc/gcc/gcc.c 

trippels@gcc2-power8 gcc % /home/trippels/gcc_build_dir_/./prev-gcc/xg++
-B/home/trippels/gcc_build_dir_/./prev-gcc/
-B/usr/local/powerpc64le-unknown-linux-gnu/bin/ -nostdinc++
-B/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
-I/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/include/powerpc64le-unknown-linux-gnu
-I/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/include
-I/home/trippels/gcc/libstdc++-v3/libsupc++
-L/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/src/.libs
-L/home/trippels/gcc_build_dir_/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
-no-pie -O3 -g -flto=32 -frandom-seed=1 -fprofile-use -DIN_GCC -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc -o xgcc gcc.o gcc-main.o ggc-none.o
c/gccspec.o driver-rs6000.o libcommon-target.a libcommon.a ../libcpp/libcpp.a
../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a
/usr/include/sys/resource.h:50:12: warning: type of ‘getrlimit’ does not match
original declaration [-Wlto-type-mismatch]
 extern int getrlimit (__rlimit_resource_t __resource,
            ^
/usr/include/sys/resource.h:50:12: note: type mismatch in parameter 1
 extern int getrlimit (__rlimit_resource_t __resource,
            ^
/usr/include/sys/resource.h:42:13: note: type ‘__rlimit_resource_t’ should
match type ‘__rlimit_resource_t’
 typedef int __rlimit_resource_t;
             ^
/usr/include/sys/resource.h:38:32: note: the incompatible type is defined here
 typedef enum __rlimit_resource __rlimit_resource_t;
                                ^
/usr/include/sys/resource.h:50:12: note: ‘getrlimit’ was previously declared
here
 extern int getrlimit (__rlimit_resource_t __resource,
            ^
/usr/include/sys/resource.h:69:12: warning: type of ‘setrlimit’ does not match
original declaration [-Wlto-type-mismatch]
 extern int setrlimit (__rlimit_resource_t __resource,
            ^
/usr/include/sys/resource.h:69:12: note: type mismatch in parameter 1
 extern int setrlimit (__rlimit_resource_t __resource,
            ^
/usr/include/sys/resource.h:42:13: note: type ‘__rlimit_resource_t’ should
match type ‘__rlimit_resource_t’
 typedef int __rlimit_resource_t;
             ^
/usr/include/sys/resource.h:38:32: note: the incompatible type is defined here
 typedef enum __rlimit_resource __rlimit_resource_t;
                                ^
/usr/include/sys/resource.h:69:12: note: ‘setrlimit’ was previously declared
here
 extern int setrlimit (__rlimit_resource_t __resource,
            ^

trippels@gcc2-power8 gcc % /home/trippels/gcc_build_dir_/./gcc/xgcc --version
xgcc (GCC) 6.0.0 20150712 (experimental)
>From gcc-bugs-return-492068-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jul 12 11:23:21 2015
Return-Path: <gcc-bugs-return-492068-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17828 invoked by alias); 12 Jul 2015 11:23: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 17750 invoked by uid 55); 12 Jul 2015 11:23:17 -0000
From: "kugan at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/66726] missed optimization, factor conversion out of COND_EXPR
Date: Sun, 12 Jul 2015 11:23: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kugan at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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-66726-4-GT0hXcz3vw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66726-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66726-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: 2015-07/txt/msg00958.txt.bz2
Content-length: 1014

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

--- Comment #8 from kugan at gcc dot gnu.org ---
Author: kugan
Date: Sun Jul 12 11:22:42 2015
New Revision: 225722

URL: https://gcc.gnu.org/viewcvs?rev"5722&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2015-07-12  Kugan Vivekanandarajah  <kuganv@linaro.org>
            Jeff Law  <law@redhat.com>

        PR middle-end/66726
        * g++.dg/tree-ssa/pr66726.c: New test.
        * gcc.dg/tree-ssa/pr66726-2.c: New test.
        * gcc.dg/tree-ssa/pr66726.c: New test.


gcc/ChangeLog:

2015-07-12  Kugan Vivekanandarajah  <kuganv@linaro.org>

        PR middle-end/66726
        * tree-ssa-phiopt.c(factor_out_conditional_conversion): New function.
        tree_ssa_phiopt_worker): Call it.



Added:
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr66726.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr66726-2.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr66726.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-phiopt.c


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

* [Bug bootstrap/66801] [6 Regression] gcc miscompiled during PGO/LTO bootstrap
  2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2015-07-12 10:24 ` trippels at gcc dot gnu.org
@ 2015-08-12  8:58 ` trippels at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-08-12  8:58 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

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

--- Comment #20 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Cannot reproduce the issue anymore. Closing.


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

end of thread, other threads:[~2015-08-12  8:58 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08  7:44 [Bug bootstrap/66801] New: [6 Regression] gcc miscompiled during PGO/LTO bootstrap trippels at gcc dot gnu.org
2015-07-08  7:53 ` [Bug bootstrap/66801] " rguenth at gcc dot gnu.org
2015-07-08  9:38 ` trippels at gcc dot gnu.org
2015-07-08 10:24 ` trippels at gcc dot gnu.org
2015-07-08 11:13 ` rguenth at gcc dot gnu.org
2015-07-08 11:41 ` trippels at gcc dot gnu.org
2015-07-08 11:43 ` rguenther at suse dot de
2015-07-08 12:22 ` rguenth at gcc dot gnu.org
2015-07-08 14:22 ` rguenth at gcc dot gnu.org
2015-07-08 14:22 ` rguenth at gcc dot gnu.org
2015-07-08 14:25 ` trippels at gcc dot gnu.org
2015-07-08 15:06 ` trippels at gcc dot gnu.org
2015-07-09  7:37 ` rguenth at gcc dot gnu.org
2015-07-09  8:32 ` trippels at gcc dot gnu.org
2015-07-09  8:44 ` rguenth at gcc dot gnu.org
2015-07-09 10:27 ` trippels at gcc dot gnu.org
2015-07-09 11:15 ` rguenth at gcc dot gnu.org
2015-07-09 12:20 ` trippels at gcc dot gnu.org
2015-07-12  9:07 ` trippels at gcc dot gnu.org
2015-07-12 10:24 ` trippels at gcc dot gnu.org
2015-08-12  8:58 ` trippels at gcc dot gnu.org

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