public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3
@ 2013-05-07  8:34 Joost.VandeVondele at mat dot ethz.ch
  2013-05-07  8:48 ` [Bug middle-end/57192] " rguenth at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-07  8:34 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 57192
           Summary: [4.9 Regression] miscompilation at -O3
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Joost.VandeVondele@mat.ethz.ch


Created attachment 30045
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30045
testcase, reproduce with 'gfortran  -g -O3 orbital_pointers.f90  ; valgrind
./a.out'

For the attached testcase, recently 4.9 trunk started generating the following
error under valgrind:


gfortran  -g -O3 orbital_pointers.f90  ; valgrind ./a.out


==61245== Invalid write of size 4
==61245==    at 0x400EED: __orbital_pointers_MOD_init_orbital_pointers
(orbital_pointers.f90:102)
==61245==    by 0x401B71: main (orbital_pointers.f90:214)
==61245==  Address 0x4da2ee4 is not stack'd, malloc'd or (recently) free'd

when compiled at -O3 . Compiling with 4.8 branch, or 4.9 and -O2 doesn't cause
this behavior. 

It has been reduced from CP2K after observing that CP2K segfaults due to a
change made between rev198568 and rev198590 (but I'm not yet 100% sure this
testcase is the root cause).


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-07  8:48 ` rguenth at gcc dot gnu.org
  2013-05-07  9:26 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-07  8:48 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
  2013-05-07  8:48 ` [Bug middle-end/57192] " rguenth at gcc dot gnu.org
@ 2013-05-07  9:26 ` Joost.VandeVondele at mat dot ethz.ch
  2013-05-07 18:23 ` wschmidt at gcc dot gnu.org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-07  9:26 UTC (permalink / raw)
  To: gcc-bugs


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

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joost.VandeVondele at mat
                   |                            |dot ethz.ch, wschmidt at
                   |                            |linux dot vnet.ibm.com

--- Comment #1 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-05-07 09:26:20 UTC ---
I think this is triggered by slsr om r198586 as it shortly disappeared r198592
and reappeared after r198627.


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
  2013-05-07  8:48 ` [Bug middle-end/57192] " rguenth at gcc dot gnu.org
  2013-05-07  9:26 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-07 18:23 ` wschmidt at gcc dot gnu.org
  2013-05-07 18:54 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2013-05-07 18:23 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Bill Schmidt <wschmidt at gcc dot gnu.org> 2013-05-07 18:23:21 UTC ---
Created attachment 30047
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30047
Proposed patch

Hi Joost,

Can you please apply the proposed patch and see if this fixes your problem?  My
browser is having trouble downloading your attachment (doesn't grok
text/x-fortran and won't allow me to set an association for it).

Thanks,
Bill


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (2 preceding siblings ...)
  2013-05-07 18:23 ` wschmidt at gcc dot gnu.org
@ 2013-05-07 18:54 ` Joost.VandeVondele at mat dot ethz.ch
  2013-05-07 19:02 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-07 18:54 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-05-07 18:54:55 UTC ---
(In reply to comment #2)
> Created attachment 30047 [details]
> Proposed patch

I'll give it a try. 

Meanwhile, this might be an easy way to get the testcase (and rename to
test.f90)

wget http://gcc.gnu.org/bugzilla/attachment.cgi?id=30045


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (3 preceding siblings ...)
  2013-05-07 18:54 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-07 19:02 ` Joost.VandeVondele at mat dot ethz.ch
  2013-05-07 20:13 ` wschmidt at gcc dot gnu.org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-07 19:02 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-05-07 19:01:56 UTC ---
BTW, on trunk:

../../gcc/gcc/gimple-ssa-strength-reduction.c: In function ‘void
analyze_candidates_and_replace()’:
../../gcc/gcc/gimple-ssa-strength-reduction.c:3394:17: warning: comparison
between signed and unsigned integer expressions [-Wsign-compare]


It actually seems current trunk r198693 also works for the testcase (with and
without your patch)?
>From gcc-bugs-return-421773-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue May 07 19:16:37 2013
Return-Path: <gcc-bugs-return-421773-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8595 invoked by alias); 7 May 2013 19:16:36 -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 8267 invoked by uid 48); 7 May 2013 19:16:31 -0000
From: "Joost.VandeVondele at mat dot ethz.ch" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
Date: Tue, 07 May 2013 19:16:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: Joost.VandeVondele at mat dot ethz.ch
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57192-4-RRIKAGx6PR@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57192-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57192-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-05/txt/msg00446.txt.bz2
Content-length: 344


http://gcc.gnu.org/bugzilla/show_bug.cgi?idW192

--- Comment #5 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-05-07 19:16:31 UTC ---
Current trunk (without the patch) seems to fix also the original problem. At
least for this case, the proposed patch seems not necessary. I think the bug
can be closed as fixed.


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (4 preceding siblings ...)
  2013-05-07 19:02 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-07 20:13 ` wschmidt at gcc dot gnu.org
  2013-05-08  5:47 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2013-05-07 20:13 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Bill Schmidt <wschmidt at gcc dot gnu.org> 2013-05-07 20:13:10 UTC ---
Ah, and thanks for noting the compile warning.  I would have expected that to
get caught in bootstrap, odd.  I'll fix that.


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (5 preceding siblings ...)
  2013-05-07 20:13 ` wschmidt at gcc dot gnu.org
@ 2013-05-08  5:47 ` Joost.VandeVondele at mat dot ethz.ch
  2013-05-08  6:01 ` dominiq at lps dot ens.fr
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-08  5:47 UTC (permalink / raw)
  To: gcc-bugs


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

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2013-05-08
         Resolution|FIXED                       |
     Ever Confirmed|0                           |1

--- Comment #8 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-05-08 05:47:13 UTC ---
Actually, I see the original problem re-appear with this morning's trunk. So
something seems to randomly trigger this. Running the compilation of the
testcase under valgrind, there appears to be an issue remaining. I'm not
anymore sure this is relate to SLSR, but let me reopen the PR.

==50122== Conditional jump or move depends on uninitialised value(s)
==50122==    at 0xDF5DAB: register_active_defs(df_ref_d**) (sparseset.h:147)
==50122==    by 0xDF5E34: update_df_init(rtx_def*, rtx_def*) [clone .isra.11]
(fwprop.c:893)
==50122==    by 0xDF65F1: try_fwprop_subst(df_ref_d*, rtx_def**, rtx_def*,
rtx_def*, bool) (fwprop.c:962)
==50122==    by 0xDF6A91: forward_propagate_into(df_ref_d*) (fwprop.c:1342)
==50122==    by 0xDF7A07: fwprop_addr() (fwprop.c:1528)
==50122==    by 0x9021DF: execute_one_pass(opt_pass*) (passes.c:2337)
==50122==    by 0x902644: execute_pass_list(opt_pass*) (passes.c:2389)
==50122==    by 0x902656: execute_pass_list(opt_pass*) (passes.c:2390)
==50122==    by 0x6CC857: expand_function(cgraph_node*) (cgraphunit.c:1640)
==50122==    by 0x6CE5FC: compile() (cgraphunit.c:1744)
==50122==    by 0x6CEC94: finalize_compilation_unit() (cgraphunit.c:2119)
==50122==    by 0x8992FA: write_global_declarations() (langhooks.c:322)
==50122== 
==50122== Conditional jump or move depends on uninitialised value(s)
==50122==    at 0xDF5DAB: register_active_defs(df_ref_d**) (sparseset.h:147)
==50122==    by 0xDF5E52: update_df_init(rtx_def*, rtx_def*) [clone .isra.11]
(fwprop.c:894)
==50122==    by 0xDF65F1: try_fwprop_subst(df_ref_d*, rtx_def**, rtx_def*,
rtx_def*, bool) (fwprop.c:962)
==50122==    by 0xDF6A91: forward_propagate_into(df_ref_d*) (fwprop.c:1342)
==50122==    by 0xDF7A07: fwprop_addr() (fwprop.c:1528)
==50122==    by 0x9021DF: execute_one_pass(opt_pass*) (passes.c:2337)
==50122==    by 0x902644: execute_pass_list(opt_pass*) (passes.c:2389)
==50122==    by 0x902656: execute_pass_list(opt_pass*) (passes.c:2390)
==50122==    by 0x6CC857: expand_function(cgraph_node*) (cgraphunit.c:1640)
==50122==    by 0x6CE5FC: compile() (cgraphunit.c:1744)
==50122==    by 0x6CEC94: finalize_compilation_unit() (cgraphunit.c:2119)
==50122==    by 0x8992FA: write_global_declarations() (langhooks.c:322)


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (6 preceding siblings ...)
  2013-05-08  5:47 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-08  6:01 ` dominiq at lps dot ens.fr
  2013-05-08  6:18 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-05-08  6:01 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-05-08 06:01:02 UTC ---
On x86_64-apple-darwin10.8.0 at revision 198697 with the patch at
http://gcc.gnu.org/ml/gcc-patches/2013-05/msg00367.html the test executes under
valgrind without error (but some "reachable" memory leaks).


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (7 preceding siblings ...)
  2013-05-08  6:01 ` dominiq at lps dot ens.fr
@ 2013-05-08  6:18 ` Joost.VandeVondele at mat dot ethz.ch
  2013-05-08  6:27 ` dominiq at lps dot ens.fr
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-08  6:18 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-05-08 06:18:54 UTC ---
(In reply to comment #9)
> On x86_64-apple-darwin10.8.0 at revision 198697 with the patch at
> http://gcc.gnu.org/ml/gcc-patches/2013-05/msg00367.html the test executes under
> valgrind without error (but some "reachable" memory leaks).

also with the patch, which I assumed is the one attached to this PR, applied to
gcc, I see the valgrind warnings during compilation. Can you check what you see
by running f951 under valgrind  ?


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (8 preceding siblings ...)
  2013-05-08  6:18 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-08  6:27 ` dominiq at lps dot ens.fr
  2013-05-08 13:04 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-05-08  6:27 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-05-08 06:27:32 UTC ---
> Can you check what you see by running f951 under valgrind  ?

It fails for me with:

[macbook] f90/bug% valgrind
/opt/gcc/gcc4.9w/libexec/gcc/x86_64-apple-darwin10.8.0/4.9.0/f951 -O3
pr57192.f90
valgrind: mmap(0x100f87000, 1074532352) failed in UME (load_segment2).


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (9 preceding siblings ...)
  2013-05-08  6:27 ` dominiq at lps dot ens.fr
@ 2013-05-08 13:04 ` Joost.VandeVondele at mat dot ethz.ch
  2013-05-09 15:45 ` wschmidt at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-08 13:04 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #12 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-05-08 13:03:59 UTC ---
Reduced testcase that still triggers the valgrind warning during compilation:

MODULE orbital_pointers
  INTEGER, DIMENSION(:,:), ALLOCATABLE   :: soset
CONTAINS
  SUBROUTINE create_orbital_pointers(maxl)
    soset(:,:) = 0
  END SUBROUTINE create_orbital_pointers
END MODULE orbital_pointers

gfortran -O3 

==81795== Conditional jump or move depends on uninitialised value(s)
==81795==    at 0xDF5DAB: register_active_defs(df_ref_d**) (sparseset.h:147)
==81795==    by 0xDF5E52: update_df_init(rtx_def*, rtx_def*) [clone .isra.11]
(fwprop.c:894)
==81795==    by 0xDF65F1: try_fwprop_subst(df_ref_d*, rtx_def**, rtx_def*,
rtx_def*, bool) (fwprop.c:962)
==81795==    by 0xDF6A91: forward_propagate_into(df_ref_d*) (fwprop.c:1342)
==81795==    by 0xDF7B27: fwprop() (fwprop.c:1479)
==81795==    by 0x9021DF: execute_one_pass(opt_pass*) (passes.c:2337)
==81795==    by 0x902644: execute_pass_list(opt_pass*) (passes.c:2389)
==81795==    by 0x902656: execute_pass_list(opt_pass*) (passes.c:2390)
==81795==    by 0x6CC857: expand_function(cgraph_node*) (cgraphunit.c:1640)
==81795==    by 0x6CE5FC: compile() (cgraphunit.c:1744)
==81795==    by 0x6CEC94: finalize_compilation_unit() (cgraphunit.c:2119)
==81795==    by 0x8992FA: write_global_declarations() (langhooks.c:322)


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (10 preceding siblings ...)
  2013-05-08 13:04 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-09 15:45 ` wschmidt at gcc dot gnu.org
  2013-05-09 15:46 ` wschmidt at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2013-05-09 15:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
(In reply to Joost VandeVondele from comment #0)
> when compiled at -O3 . Compiling with 4.8 branch, or 4.9 and -O2 doesn't
> cause this behavior. 

I just want to point out that SLSR runs at -O1 and above by default, so a
difference between -O2 and -O3 would seem to indicate something else.

Thanks,
Bill


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (11 preceding siblings ...)
  2013-05-09 15:45 ` wschmidt at gcc dot gnu.org
@ 2013-05-09 15:46 ` wschmidt at gcc dot gnu.org
  2013-05-09 15:55 ` wschmidt at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2013-05-09 15:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Of course, there can be secondary effects that cause SLSR to kick in with
different intermediate code, but it's something to consider.


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (12 preceding siblings ...)
  2013-05-09 15:46 ` wschmidt at gcc dot gnu.org
@ 2013-05-09 15:55 ` wschmidt at gcc dot gnu.org
  2013-05-12 14:37 ` Joost.VandeVondele at mat dot ethz.ch
  2013-05-13 14:57 ` Joost.VandeVondele at mat dot ethz.ch
  15 siblings, 0 replies; 17+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2013-05-09 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
I was able to download your code, and I can't reproduce the problem on
powerpc64-unknown-linux-gnu with current trunk.


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (13 preceding siblings ...)
  2013-05-09 15:55 ` wschmidt at gcc dot gnu.org
@ 2013-05-12 14:37 ` Joost.VandeVondele at mat dot ethz.ch
  2013-05-13 14:57 ` Joost.VandeVondele at mat dot ethz.ch
  15 siblings, 0 replies; 17+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-12 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
(In reply to Bill Schmidt from comment #15)
> I was able to download your code, and I can't reproduce the problem on
> powerpc64-unknown-linux-gnu with current trunk.

I still see the valgrind warning for the testcase in comment #12 with current
trunk (198802, x86_64-unknown-linux-gnu ), at -O1 .. -O3.


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

* [Bug middle-end/57192] [4.9 Regression] miscompilation at -O3
  2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
                   ` (14 preceding siblings ...)
  2013-05-12 14:37 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-05-13 14:57 ` Joost.VandeVondele at mat dot ethz.ch
  15 siblings, 0 replies; 17+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-05-13 14:57 UTC (permalink / raw)
  To: gcc-bugs

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

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |steven at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #17 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
So, after some bisection, I find that the valgrind warning appears due to:

r190503 | steven | 2012-08-18 15:44:00 +0200 (Sat, 18 Aug 2012) | 4 lines

    * sparseset.c (sparseset_alloc): Use non-clearing allocation.  Tell
    valgrind not to worry about reading from unitialized memory.

so, for whatever reason this doesn't work on my setup. 

Steven, what is needed to have these valgrind hints enabled ? Are these
valgrind hints enabled by default ?

BTW, this also clearly shows that at this point this PR is unrelated to SLSR
and fixed.


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

end of thread, other threads:[~2013-05-13 14:57 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-07  8:34 [Bug middle-end/57192] New: [4.9 Regression] miscompilation at -O3 Joost.VandeVondele at mat dot ethz.ch
2013-05-07  8:48 ` [Bug middle-end/57192] " rguenth at gcc dot gnu.org
2013-05-07  9:26 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-07 18:23 ` wschmidt at gcc dot gnu.org
2013-05-07 18:54 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-07 19:02 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-07 20:13 ` wschmidt at gcc dot gnu.org
2013-05-08  5:47 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-08  6:01 ` dominiq at lps dot ens.fr
2013-05-08  6:18 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-08  6:27 ` dominiq at lps dot ens.fr
2013-05-08 13:04 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-09 15:45 ` wschmidt at gcc dot gnu.org
2013-05-09 15:46 ` wschmidt at gcc dot gnu.org
2013-05-09 15:55 ` wschmidt at gcc dot gnu.org
2013-05-12 14:37 ` Joost.VandeVondele at mat dot ethz.ch
2013-05-13 14:57 ` Joost.VandeVondele at mat dot ethz.ch

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