[Bug tree-optimization/65206] New: Vectorized version of loop is removed.

2015-02-25 Thread ysrumyan at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65206

Bug ID: 65206
   Summary: Vectorized version of loop is removed.
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ysrumyan at gmail dot com

I noticed that vectorized version of loop is deleted although compiler reports
that it was successfully vectorized:
t1.c:7:3: note: LOOP VECTORIZED

but after we can see in vect-dump:

Removing basic block 4
basic block 4, loop depth 1
 pred:   45
# i_16 = PHI i_73(45)
# ivtmp_15 = PHI ivtmp_76(45)
# vectp_a1.11_116 = PHI vectp_a1.12_114(45)
# vectp_a2.19_125 = PHI vectp_a2.20_123(45)
# vectp_a3.22_130 = PHI vectp_a3.23_128(45)
# vectp_a1.25_136 = PHI vectp_a1.26_134(45)
# vectp_a3.34_147 = PHI vectp_a3.35_145(45)
# ivtmp_38 = PHI 0(45)
vect__5.13_118 = MEM[(float *)vectp_a1.11_116];
_5 = a1[i_16];
_31 = a2[i_16];
vect__ifc__32.14_122 = VEC_COND_EXPR vect__5.13_118 = vect_cst_.15_119,
vect_cst_.16_120, vect_cst_.17_121;
_ifc__32 = _5 = x_6(D) ? 4294967295 : 0;
vect__7.18_127 = MASK_LOAD (vectp_a2.19_125, 0B, vect__ifc__32.14_122);
_7 = 0.0;
_33 = a3[i_16];
vect__8.21_132 = MASK_LOAD (vectp_a3.22_130, 0B, vect__ifc__32.14_122);
_8 = 0.0;
vect__9.24_133 = vect__7.18_127 + vect__8.21_132;
_9 = _7 + _8;
_34 = a1[i_16];
MASK_STORE (vectp_a1.25_136, 0B, vect__ifc__32.14_122, vect__9.24_133);
vect__11.27_140 = vect_cst_.28_37 + vect_cst_.29_139;
_11 = x_6(D) + 1.0e+0;
_35 = a3[i_16];
vect__ifc__36.30_144 = VEC_COND_EXPR vect__5.13_118 = vect_cst_.31_141,
vect_cst_.32_142, vect_cst_.33_143;
_ifc__36 = _5 = x_6(D) ? 0 : 4294967295;
...

Test and compile options will be attached.


[Bug middle-end/63608] [4.8/4.9 Regression] error: type mismatch in binary expression

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63608

Kai Tietz ktietz at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ktietz at gcc dot gnu.org

--- Comment #4 from Kai Tietz ktietz at gcc dot gnu.org ---
Issue is fixed on 5.0 gcc.  But confirm that issue still exists on 4.9 branch.


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

Kai Tietz ktietz at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #10 from Kai Tietz ktietz at gcc dot gnu.org ---
Fixed on trunk and 4.9


[Bug testsuite/65205] New: Wrong dh-shouldfail usage in OpenACC libgomp tests

2015-02-25 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65205

Bug ID: 65205
   Summary: Wrong dh-shouldfail usage in OpenACC libgomp tests
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Keywords: openacc
  Severity: major
  Priority: P3
 Component: testsuite
  Assignee: jnorris at gcc dot gnu.org
  Reporter: tschwinge at gcc dot gnu.org

A bunch of the OpenACC libgomp tests that we added are expected to terminate
with an error exit status, and printing specific error message.  For a lot of
them, we wrongly just used dg-shouldfail directives to codify this, providing
the expected error message as the comment argument to dg-shouldfail.  Separate
dg-output directives should be used instead, so that we can detect if the test
case actually does fail, but not for the expected reason (that is, with the
specific error message).  (See
libgomp/testsuite/libgomp.oacc-fortran/data-already-1.f, for example.)


[Bug target/65196] avr_adjust_insn_length uses recog_memoized on invalid insn

2015-02-25 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65196

--- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Wed Feb 25 12:34:21 2015
New Revision: 220965

URL: https://gcc.gnu.org/viewcvs?rev=220965root=gccview=rev
Log:
PR target/65196
* config/avr/avr.c (avr_adjust_insn_length): Call recog_memoized
only with NONDEBUG_INSN_P.


Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/avr/avr.c


[Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #6 from Kai Tietz ktietz at gcc dot gnu.org ---
Author: ktietz
Date: Wed Feb 25 13:36:00 2015
New Revision: 220966

URL: https://gcc.gnu.org/viewcvs?rev=220966root=gccview=rev
Log:
2015-02-25  Richard Biener  rguent...@suse.de
Kai Tietz  kti...@redhat.com

PR tree-optimization/61917
* tree-vect-loop.c (vectorizable_reduction): Allow
vect_internal_def without reduction to exit graceful.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-loop.c


[Bug tree-optimization/51017] [4.8/4.9/5 Regression] GCC performance regression (vs. 4.4/4.5), PRE increases register pressure too much

2015-02-25 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51017

Jeffrey A. Law law at redhat dot com changed:

   What|Removed |Added

   Priority|P3  |P2
 CC||law at redhat dot com


[Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #7 from Kai Tietz ktietz at gcc dot gnu.org ---
Author: ktietz
Date: Wed Feb 25 13:42:12 2015
New Revision: 220967

URL: https://gcc.gnu.org/viewcvs?rev=220967root=gccview=rev
Log:
PR tree-optimization/61917
* gcc.dg/vect/vect-pr61917.c: New file.


Added:
trunk/gcc/testsuite/gcc.dg/vect/vect-pr61917.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug target/65196] avr_adjust_insn_length uses recog_memoized on invalid insn

2015-02-25 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65196

Georg-Johann Lay gjl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||4.8.5, 4.9.3
 Resolution|--- |FIXED
   Target Milestone|--- |4.9.3
  Known to fail||4.8.4, 4.9.2

--- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Fixed.


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

Jeffrey A. Law law at redhat dot com changed:

   What|Removed |Added

 CC||law at redhat dot com
Summary|[4.9/5 Regression] ICE on   |[4.9 Regression] ICE on
   |valid code at -O3 on|valid code at -O3 on
   |x86_64-linux-gnu in |x86_64-linux-gnu in
   |vectorizable_reduction, at  |vectorizable_reduction, at
   |tree-vect-loop.c:4913   |tree-vect-loop.c:4913

--- Comment #8 from Jeffrey A. Law law at redhat dot com ---
Fixed on trunk.


[Bug c++/65199] Linker failure with -flto

2015-02-25 Thread goswin-v-b at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65199

--- Comment #2 from Goswin von Brederlow goswin-v-b at web dot de ---
That fixes it. Isn't it a gcc bug though not to detect that itself?


[Bug target/65196] avr_adjust_insn_length uses recog_memoized on invalid insn

2015-02-25 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65196

--- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Wed Feb 25 12:18:51 2015
New Revision: 220963

URL: https://gcc.gnu.org/viewcvs?rev=220963root=gccview=rev
Log:
PR target/65196
* config/avr/avr.c (avr_adjust_insn_length): Call recog_memoized
only with NONDEBUG_INSN_P.


Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/avr/avr.c


[Bug tree-optimization/65206] Vectorized version of loop is removed.

2015-02-25 Thread ysrumyan at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65206

--- Comment #1 from Yuri Rumyantsev ysrumyan at gmail dot com ---
Created attachment 34867
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34867action=edit
test-case to reproduce

Test needs to be compiled with -Ofast -m64 -mcore-avx2 options.


[Bug target/65196] avr_adjust_insn_length uses recog_memoized on invalid insn

2015-02-25 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65196

--- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Wed Feb 25 12:26:41 2015
New Revision: 220964

URL: https://gcc.gnu.org/viewcvs?rev=220964root=gccview=rev
Log:
PR target/65196
* config/avr/avr.c (avr_adjust_insn_length): Call recog_memoized
only with NONDEBUG_INSN_P.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c


[Bug testsuite/64145] [5 Regression] gcc.dg/graphite/isl-codegen-loop-dumping.c UNRESOLVED after r217315.

2015-02-25 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64145

Jeffrey A. Law law at redhat dot com changed:

   What|Removed |Added

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

--- Comment #8 from Jeffrey A. Law law at redhat dot com ---
Fixed on trunk back in in December, forgot to close last night.


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #9 from Kai Tietz ktietz at gcc dot gnu.org ---
Author: ktietz
Date: Wed Feb 25 14:12:46 2015
New Revision: 220968

URL: https://gcc.gnu.org/viewcvs?rev=220968root=gccview=rev
Log:

2015-02-25  Richard Biener  rguent...@suse.de
Kai Tietz  kti...@redhat.com

Backport from mainline
PR tree-optimization/61917
* tree-vect-loop.c (vectorizable_reduction): Allow
vect_internal_def without reduction to exit graceful.

ChangeLog testsuite/

2015-02-25  Kai Tietz  kti...@redhat.com

Backport from mainline
PR tree-optimization/61917
* gcc.dg/vect/vect-pr61917.c: New file.


Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/vect/vect-pr61917.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/tree-vect-loop.c


[Bug target/64997] [AArch64] Illegal EON on SIMD registers

2015-02-25 Thread alalaw01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64997

--- Comment #2 from alalaw01 at gcc dot gnu.org ---
Author: alalaw01
Date: Wed Feb 25 14:20:13 2015
New Revision: 220969

URL: https://gcc.gnu.org/viewcvs?rev=220969root=gccview=rev
Log:
[AArch64] Fix illegal assembly 'eon v1, v2, v3'

PR target/64997
* config/aarch64/aarch64.md (*xor_one_cmplmode3): Use FP_REGNUM_P
as split condition; force split via '#' in output pattern.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/aarch64/aarch64.md


[Bug debug/53927] wrong value for DW_AT_static_link

2015-02-25 Thread derodat at adacore dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927

--- Comment #14 from Pierre-Marie de Rodat derodat at adacore dot com ---
Created attachment 34868
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34868action=edit
patch to generate DWARF-compliant DW_AT_static_link attributes

gcc/
* tree-nested.c (finalize_nesting_tree_1): Append a field to
hold the frame base address.
* dwarf2out.c (gen_subprogram_die): Generate for
DW_AT_static_link a location description that computes the value
of this field.


[Bug debug/53927] wrong value for DW_AT_static_link

2015-02-25 Thread derodat at adacore dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927

Pierre-Marie de Rodat derodat at adacore dot com changed:

   What|Removed |Added

 CC||derodat at adacore dot com

--- Comment #13 from Pierre-Marie de Rodat derodat at adacore dot com ---
(In reply to Tom Tromey from comment #8)
  Yes, but you can do something useful even with this value of
  DW_AT_static_link, albeit not exactly what DWARF means.
 
 Regardless, I think GCC should emit correct DWARF.

I gave it a try: see the attached patch.

Jason suggested to change DW_AT_frame_base in order to make it equal to the
address of the FRAME object. I was not sure:

 1) how to do it: location descriptions for all local variables would need to
be updated;
 2) whether it's safe to do this: what if optimizers move/duplicate this FRAME
object in the stack frame or do similar disturbing things? I'm not familiar
enough with optimization passes to estimate if it's likely: feedback welcome.
:-)

I thought: why not make DW_AT_static_link compute the parent frame base address
from the current static link argument? Well, when generating DW_AT_static_link
for a nested subprogram, we do not know yet the offset between the FRAME object
and the frame base address. This is because nested subprograms reach the
back-end before their parent. Besides, see point 2: are we only sure that such
a constant offset exists?

So instead, I patched tree-nested.c in order to append a field at the end of
the FRAME object to hold the frame base address (computed with the DWARF_CFA
builtin). Then, dwarf2out.c just has to emit a location description for nested
subprograms' DW_AT_static_link that fetches this using the static link
argument. It's consuming a little stack space, I'm not sure if it's a problem.
Once again: feedback welcome!

Besides, this does not work yet with Fortran since for this front-end, the
DWARF_CFA builtin is not registered. None of builtins.def are registered by the
way: how could I register only this one without duplicating code? Is it a good
idea anyway?

For the record, I bootstrapped and reg-tested this patch on x86_64-linux and
preliminary manual testing with a patched GDB[1] and Ada reproducers shows that
this approach is working.

Thoughts?

[1] This patch teaches GDB how to use DW_AT_static_link in order to find the
frame corresponding to the lexically enclosing scope. I think I will try to
submit it to GDB soon.


[Bug tree-optimization/65206] Vectorized version of loop is removed.

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

--- Comment #2 from Richard Biener rguenth at gcc dot gnu.org ---
We apply versioning for aliasing but compute it as always aliasing in some way,
thus the runtime check gets immediately folded and thus the vectorized loop
removed:

t.c:7:3: note: create runtime check for data references a1[i_16] and *_34
t.c:7:3: note: created 1 versioning for alias checks.
t.c:7:3: note: loop versioned for vectorization because of possible aliasing
...

but I see the alias runtime check nowhere.

The DRs are

(gdb) p debug_data_reference (dr_a.dr)
#(Data Ref: 
#  bb: 4 
#  stmt: _5 = a1[i_16];
#  ref: a1[i_16];
#  base_object: a1;
#  Access function 0: {0, +, 1}_1
#)
$17 = void
(gdb) p debug_data_reference (dr_b.dr)
#(Data Ref: 
#  bb: 4 
#  stmt: MASK_STORE (_34, 0B, _ifc__32, _9);
#  ref: *_34;
#  base_object: MEM[(float *)a1];
#  Access function 0: {0B, +, 4}_1
#)

so maybe the code doing masked loads/stores updates the DRs in a way that
will later confuse runtime alias checking.  Or for some reason it doesn't
update it enough to make data-dependence analysis handle it.

Clearly this is a must-dependence (but with known distance), so sth
that data dependence analysis should handle and sth that the runtime
alias checking isn't handling.


[Bug tree-optimization/65206] Vectorized version of loop is removed.

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

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 #5 from Richard Biener rguenth at gcc dot gnu.org ---
(In reply to Richard Biener from comment #4)
 I'm talking about
 
 (compute_affine_dependence
   stmt_a: _5 = a1[i_16];
   stmt_b: MASK_STORE (_34, 0B, _ifc__32, _9);
 ) - dependence analysis failed

Ah - this is pointer vs. array access, thus different base.  A generic issue
that can for example be solved by trying to force a pointer base for
a non-pointer base DR when analysis fails and one is based on a pointer.

Hmm.

Mine.

 somehow it works for
 
 (compute_affine_dependence
   stmt_a: _8 = MASK_LOAD (_33, 0B, _ifc__32);
   stmt_b: MASK_STORE (_35, 0B, _ifc__36, _11);
 (analyze_overlapping_iterations
   (chrec_a = {0B, +, 4}_1)
   (chrec_b = {0B, +, 4}_1)
   (overlap_iterations_a = [0])
   (overlap_iterations_b = [0]))
 )


[Bug tree-optimization/65207] [5 regression] performance: tree level loop optimization does not peel SpecCPU href loop

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

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-02-25
 CC||hubicka at gcc dot gnu.org
   Target Milestone|--- |5.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
I believe there is a duplicate bug complaining about the same heuristic.  I can
confirm the heuristic is new.

Why doesn't the call overhead cancel all gains of the peeling?


[Bug debug/58315] [4.8/4.9/5 Regression] Excessive memory use with -g

2015-02-25 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58315

--- Comment #28 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Wed Feb 25 15:49:34 2015
New Revision: 220974

URL: https://gcc.gnu.org/viewcvs?rev=220974root=gccview=rev
Log:
PR debug/58315
* decl.c (start_preparsed_function): Use create_artificial_label
for cdtor_label.

Added:
trunk/gcc/testsuite/g++.dg/tree-ssa/deleted-label1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c


[Bug c++/65211] Type alignment lost inside templated function

2015-02-25 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65211

--- Comment #2 from Allan Jensen linux at carewolf dot com ---
Created attachment 34873
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34873action=edit
Intermediate


[Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212

--- Comment #7 from Kai Tietz ktietz at gcc dot gnu.org ---
Tested patch posted at https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01502.html


[Bug c++/65211] Type alignment lost inside templated function

2015-02-25 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65211

Allan Jensen linux at carewolf dot com changed:

   What|Removed |Added

  Attachment #34873|0   |1
is obsolete||

--- Comment #3 from Allan Jensen linux at carewolf dot com ---
Created attachment 34875
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34875action=edit
Correct intermediate


[Bug tree-optimization/65206] Vectorized version of loop is removed.

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

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-02-25
 CC||jakub at gcc dot gnu.org
 Blocks||53947
 Ever confirmed|0   |1

--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org ---
Confirmed.  CCing Jakub who implemented this stuff.


[Bug sanitizer/64337] ThreadSanitizer: std::thread + lambda false positive

2015-02-25 Thread guillaume.sabouret at starqube dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64337

guillaume.sabouret at starqube dot com changed:

   What|Removed |Added

 CC||guillaume.sabouret@starqube
   ||.com

--- Comment #3 from guillaume.sabouret at starqube dot com ---
At least in my case, the bug only happens when flag -g is set.


[Bug target/65210] New: [avr] ICE: when using attributs 'address' and 'io_low'

2015-02-25 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65210

Bug ID: 65210
   Summary: [avr] ICE: when using attributs 'address' and 'io_low'
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gjl at gcc dot gnu.org
Target: avr

Compiled with

$ avr-gcc prog.c -S -Os -mmcu=atmega8

the following program ICEs:

volatile char q __attribute__((io_low,address(0x81)));


Target: avr
Configured with: ../../gcc.gnu.org/trunk/configure --target=avr
--prefix=/local/gnu/install/gcc-5.0 --disable-shared --disable-nls
--with-dwarf2 --enable-target-optspace=yes --with-gnu-as --with-gnu-ld
--enable-languages=c,c++,lto --enable-checking=all
Thread model: single
gcc version 5.0.0 20150220 (experimental) (GCC) 
GNU C11 (GCC) version 5.0.0 20150220 (experimental) (avr)
compiled by GNU C version 4.7.2, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.2

ignoring nonexistent directory
/local/gnu/build/gcc-trunk-avr/gcc/../lib/gcc/avr/5.0.0/include
ignoring nonexistent directory
/local/gnu/build/gcc-trunk-avr/gcc/../lib/gcc/avr/5.0.0/include-fixed
ignoring nonexistent directory
/local/gnu/build/gcc-trunk-avr/gcc/../lib/gcc/avr/5.0.0/../../../../avr/sys-include
ignoring nonexistent directory
/local/gnu/build/gcc-trunk-avr/gcc/../lib/gcc/avr/5.0.0/../../../../avr/include
ignoring nonexistent directory
/local/gnu/build/gcc-trunk-avr/gcc/../lib/gcc/../../lib/gcc/avr/5.0.0/include
ignoring nonexistent directory
/local/gnu/build/gcc-trunk-avr/gcc/../lib/gcc/../../lib/gcc/avr/5.0.0/include-fixed
ignoring nonexistent directory
/local/gnu/build/gcc-trunk-avr/gcc/../lib/gcc/../../lib/gcc/avr/5.0.0/../../../../avr/sys-include
ignoring nonexistent directory
/local/gnu/build/gcc-trunk-avr/gcc/../lib/gcc/../../lib/gcc/avr/5.0.0/../../../../avr/include
#include ... search starts here:
#include ... search starts here:
 /mnt/nfs/home/georg/gnu/build/gcc-trunk-avr/gcc/include
 /mnt/nfs/home/georg/gnu/build/gcc-trunk-avr/gcc/include-fixed
End of search list.
GNU C11 (GCC) version 5.0.0 20150220 (experimental) (avr)
compiled by GNU C version 4.7.2, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=0 --param ggc-min-heapsize=0
Compiler executable checksum: 63d1ce1dc9d02ab6b837fe423af8fe37
atiny.c:1:1: internal compiler error: in avr_eval_addr_attrib, at
config/avr/avr.c:9008
 volatile char q __attribute__((io_low,address(0x81)));
 ^
0x8ac4d2b avr_eval_addr_attrib(rtx_def*)
../../../gcc.gnu.org/trunk/gcc/config/avr/avr.c:9008
0x8ac627b avr_asm_output_aligned_decl_common(_IO_FILE*, tree_node*, char
const*, unsigned long long, unsigned int, bool)
../../../gcc.gnu.org/trunk/gcc/config/avr/avr.c:9302
0x8a8cc4e emit_common
../../../gcc.gnu.org/trunk/gcc/varasm.c:1979
0x8a9f86b assemble_noswitch_variable
../../../gcc.gnu.org/trunk/gcc/varasm.c:2034
0x8a9f86b assemble_variable(tree_node*, int, int, int)
../../../gcc.gnu.org/trunk/gcc/varasm.c:2233
0x8aa2564 varpool_node::assemble_decl()
../../../gcc.gnu.org/trunk/gcc/varpool.c:597
0x8aa333b symbol_table::output_variables()
../../../gcc.gnu.org/trunk/gcc/varpool.c:750
0x830dcdd symbol_table::compile()
../../../gcc.gnu.org/trunk/gcc/cgraphunit.c:2360
0x830f9fc symbol_table::finalize_compilation_unit()
../../../gcc.gnu.org/trunk/gcc/cgraphunit.c:2436
0x817d533 c_write_global_declarations()
../../../gcc.gnu.org/trunk/gcc/c/c-decl.c:10803


[Bug c++/65198] [5 Regression] User-defined literal template inside generic lambda segfaults GCC 5.0

2015-02-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65198

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek mpolacek at gcc dot gnu.org ---
Fixed by r220656.

This crashes for me with 4.9 though:
0xb7e61f crash_signal
/home/marek/src/gcc/gcc/toplev.c:337
0xdbb3e4 contains_struct_check
/home/marek/src/gcc/gcc/tree.h:3047
0xdbb3e4 int_cst_value(tree_node const*)
/home/marek/src/gcc/gcc/tree.c:10526
0x652434 get_non_default_template_args_count
/home/marek/src/gcc/gcc/cp/error.c:186
0x65b4d1 dump_template_argument_list
/home/marek/src/gcc/gcc/cp/error.c:195
0x654905 dump_decl
/home/marek/src/gcc/gcc/cp/error.c:1181
0x65b497 expr_to_string
/home/marek/src/gcc/gcc/cp/error.c:2847
0x6600f4 cp_printer
/home/marek/src/gcc/gcc/cp/error.c:3443
0x10d95e3 pp_format(pretty_printer*, text_info*)
/home/marek/src/gcc/gcc/pretty-print.c:616
0x10d701c diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
/home/marek/src/gcc/gcc/diagnostic.c:797
0x10d7d8f internal_error(char const*, ...)
/home/marek/src/gcc/gcc/diagnostic.c:1136
0x70aa6b cxx_eval_constant_expression
/home/marek/src/gcc/gcc/cp/semantics.c:9833
0x70dc25 cxx_eval_outermost_constant_expr
/home/marek/src/gcc/gcc/cp/semantics.c:9853
0x71091b maybe_constant_value(tree_node*)
/home/marek/src/gcc/gcc/cp/semantics.c:9963
0x5d11c1 build_non_dependent_expr(tree_node*)
/home/marek/src/gcc/gcc/cp/pt.c:21564
0x6f9d22 finish_call_expr(tree_node*, vectree_node*, va_gc, vl_embed**, bool,
bool, int)
/home/marek/src/gcc/gcc/cp/semantics.c:2250
0x67a61d cp_parser_userdef_numeric_literal
/home/marek/src/gcc/gcc/cp/parser.c:3926
0x67a61d cp_parser_primary_expression
/home/marek/src/gcc/gcc/cp/parser.c:4163
0x67b766 cp_parser_postfix_expression
/home/marek/src/gcc/gcc/cp/parser.c:5971
0x67e057 cp_parser_unary_expression
/home/marek/src/gcc/gcc/cp/parser.c:7172
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.


[Bug c++/65211] Type alignment lost inside templated function

2015-02-25 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65211

--- Comment #1 from Allan Jensen linux at carewolf dot com ---
Created attachment 34872
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34872action=edit
Assembler intermediate

It is the movdqa(%rdx), %xmm1 instruction on line 19 that is wrong.


[Bug tree-optimization/65206] Vectorized version of loop is removed.

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

--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org ---
I'm talking about

(compute_affine_dependence
  stmt_a: _5 = a1[i_16];
  stmt_b: MASK_STORE (_34, 0B, _ifc__32, _9);
) - dependence analysis failed

somehow it works for

(compute_affine_dependence
  stmt_a: _8 = MASK_LOAD (_33, 0B, _ifc__32);
  stmt_b: MASK_STORE (_35, 0B, _ifc__36, _11);
(analyze_overlapping_iterations
  (chrec_a = {0B, +, 4}_1)
  (chrec_b = {0B, +, 4}_1)
  (overlap_iterations_a = [0])
  (overlap_iterations_b = [0]))
)


[Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212

--- Comment #6 from Kai Tietz ktietz at gcc dot gnu.org ---
(In reply to Jan Hubicka from comment #5)
 Well, can someone overwrite dllimport symbol by different definition?
 If not, it is a bug of decl_binds_to_current_def_p to return false here.
 If it can be inteprposed, I think the function
 symtab_node::noninterposable_alias should remove dllimport attribute on the
 alias created and so should symtab_node::make_decl_local

Thanks Honza,

well, dllimport symbol can be interposed ... well their function-stub can.  So
variant two seems to be the right thing to do.
I am about to prepare a patch for this ...


[Bug c++/65209] New: [5.0 regression] Broken code with global static variables, invalid pointer when freeing global variables

2015-02-25 Thread manisandro at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65209

Bug ID: 65209
   Summary: [5.0 regression] Broken code with global static
variables, invalid pointer when freeing global
variables
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manisandro at gmail dot com

Created attachment 34870
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34870action=edit
testcase

Using gcc-5.0.0-0.15.fc23.x86_64

Test case attached. Build with

$ g++ -g -Wall -o main foo.cpp main.cpp

The test case crashes when freeing global variables:

./main
*** Error in `/home/sandro/Desktop/a/main': free(): invalid pointer:
0x00610001 ***


#0  0x771a6ae8 in raise () from /lib64/libc.so.6
#1  0x771a877a in abort () from /lib64/libc.so.6
#2  0x771eb092 in __libc_message () from /lib64/libc.so.6
#3  0x771f2994 in _int_free () from /lib64/libc.so.6
#4  0x771f748c in free () from /lib64/libc.so.6
#5  0x0040099b in FooData::~FooData (this=0x602118
_ZGVZN12_GLOBAL__N_112Q_QGS_s_self13innerFunctionEvE6holder,
__in_chrg=optimized out)
at foo.cpp:5
#6  0x004009da in Foo::~Foo (this=0x602100
_ZZN12_GLOBAL__N_112Q_QGS_s_self13innerFunctionEvE6holder,
__in_chrg=optimized out) at foo.cpp:8
#7  0x00400a12 in FooSingleton::~FooSingleton (this=0x602100
_ZZN12_GLOBAL__N_112Q_QGS_s_self13innerFunctionEvE6holder, 
__in_chrg=optimized out) at foo.cpp:15
#8  0x00400a69 in (anonymous
namespace)::Q_QGS_s_self::innerFunction()::Holder::~Holder() (
this=0x602100 _ZZN12_GLOBAL__N_112Q_QGS_s_self13innerFunctionEvE6holder,
__in_chrg=optimized out) at foo.cpp:33
#9  0x771ab628 in __run_exit_handlers () from /lib64/libc.so.6
#10 0x771ab675 in exit () from /lib64/libc.so.6
#11 0x77191847 in __libc_start_main () from /lib64/libc.so.6
#12 0x004007e9 in _start ()


Observations:
- Depends on the Q_QGS_s_self namespace being called such (more precisely,
exactly such, not even any other name with equal length)
- Depends on the innerFunction method being called such
- Depends on innerFunction being inline
- Depends on the size of the global variables


[Bug c++/65209] [5 Regression] Broken code with global static variables, invalid pointer when freeing global variables

2015-02-25 Thread manisandro at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65209

--- Comment #2 from Sandro Mani manisandro at gmail dot com ---
Created attachment 34874
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34874action=edit
Slightly reduced test case

==30483== Invalid free() / delete / delete[] / realloc()
==30483==at 0x4C2D143: operator delete(void*) (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30483==by 0x400983: Foo::~Foo() (foo.cpp:4)
==30483==by 0x40099F: (anonymous
namespace)::Q_QGS_s_self::innerFunction()::Holder::~Holder() (foo.cpp:21)
==30483==by 0x570F627: __run_exit_handlers (in /usr/lib64/libc-2.21.90.so)
==30483==by 0x570F674: exit (in /usr/lib64/libc-2.21.90.so)
==30483==by 0x56F5846: (below main) (in /usr/lib64/libc-2.21.90.so)
==30483==  Address 0x1 is not stack'd, malloc'd or (recently) free'd


[Bug c/65208] New: Floats sometimes rounded up instead of being truncated on mips

2015-02-25 Thread wgh at beyondunreal dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65208

Bug ID: 65208
   Summary: Floats sometimes rounded up instead of being truncated
on mips
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wgh at beyondunreal dot com

Created attachment 34869
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34869action=edit
preprocessed input

It seems like typical cast from double to unsigned sometimes rounds the result
up.

On my router, the attached code, compiled with the following commandline

  mipsel-linux-uclibc-gcc -Wall -Wextra -O2 -static -std=c11 test.c

prints 

  0.7
  i=1
  i=0

The compiler generates no errors or warnings.

Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/mipsel-linux-uclibc/gcc-bin/4.9.2/mipsel-linux-uclibc-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/mipsel-linux-uclibc/4.9.2/lto-wrapper
Target: mipsel-linux-uclibc
Configured with:
/var/tmp/portage/cross-mipsel-linux-uclibc/gcc-4.9.2/work/gcc-4.9.2/configure
--host=x86_64-pc-linux-gnu --target=mipsel-linux-uclibc
--build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/mipsel-linux-uclibc/gcc-bin/4.9.2
--includedir=/usr/lib/gcc/mipsel-linux-uclibc/4.9.2/include
--datadir=/usr/share/gcc-data/mipsel-linux-uclibc/4.9.2
--mandir=/usr/share/gcc-data/mipsel-linux-uclibc/4.9.2/man
--infodir=/usr/share/gcc-data/mipsel-linux-uclibc/4.9.2/info
--with-gxx-include-dir=/usr/lib/gcc/mipsel-linux-uclibc/4.9.2/include/g++-v4
--with-python-dir=/share/gcc-data/mipsel-linux-uclibc/4.9.2/python
--enable-languages=c --enable-obsolete --enable-secureplt --disable-werror
--with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.9.2 p1.1, pie-0.6.2'
--enable-poison-system-directories --disable-shared --disable-shared
--disable-libatomic --with-sysroot=/usr/mipsel-linux-uclibc --disable-bootstrap
--disable-__cxa_atexit --enable-tls --disable-multilib --disable-altivec
--disable-fixed-point --with-abi= --disable-libgcj --disable-libgomp
--disable-libmudflap --disable-libssp --disable-libquadmath --enable-lto
--without-cloog --enable-libsanitizer
Thread model: posix
gcc version 4.9.2 (Gentoo 4.9.2 p1.1, pie-0.6.2)


[Bug sanitizer/65148] ICE: in get_biv_step, at loop-iv.c:823

2015-02-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65148

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek mpolacek at gcc dot gnu.org ---
It might be interesting which particular -fsanitize= options causes this. 
Maybe it reproduces only with -O -fsanitize=signed-integer-overflow?


[Bug sanitizer/65148] ICE: in get_biv_step, at loop-iv.c:823

2015-02-25 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65148

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-02-25
 Ever confirmed|0   |1

--- Comment #4 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
(In reply to Marek Polacek from comment #3)
 It might be interesting which particular -fsanitize= options causes this. 
 Maybe it reproduces only with -O -fsanitize=signed-integer-overflow?

Yes, it does.
trippels@gcc2-power8 ~ % g++ -O -fsanitize=signed-integer-overflow -c foo.ii
foo.ii: In function ‘void fn1()’:
foo.ii:7:1: internal compiler error: in get_biv_step, at loop-iv.c:823

[Bug target/65210] [avr] ICE: when using attributs 'address' and 'io_low'

2015-02-25 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65210

Georg-Johann Lay gjl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-02-25
   Target Milestone|--- |5.0
 Ever confirmed|0   |1


[Bug tree-optimization/65207] New: [5 regression] performance: tree level loop optimization does not peel SpecCPU href loop

2015-02-25 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65207

Bug ID: 65207
   Summary: [5 regression] performance: tree level loop
optimization does not peel SpecCPU href loop
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: krebbel at gcc dot gnu.org

mv-search.c
SetupFastFullPelSearch

   for (blky = 0; blky  4; blky++)
{
  LineSadBlk0 = LineSadBlk1 = LineSadBlk2 = LineSadBlk3 = 0;
  for (y = 0; y  4; y++)
  {
refptr = PelYline_11 (ref_pic, abs_y++, abs_x, img_height, img_width);
...

After the loop peeling has been removed from RTL level this loop does not get
peeled completely as before on S/390 which results in a performance regression
(-5%).

https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01211.html

The tree level loop peeling refuses to peel the loop because it contains a
function call.


[Bug target/65167] ICE: in assign_by_spills, at lra-assigns.c:1383 (unable to find a register to spill) with -O -fschedule-insns -fcheck-pointer-bounds -mmpx

2015-02-25 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65167

--- Comment #7 from ienkovich at gcc dot gnu.org ---
Author: ienkovich
Date: Wed Feb 25 15:05:48 2015
New Revision: 220970

URL: https://gcc.gnu.org/viewcvs?rev=220970root=gccview=rev
Log:
gcc/

PR target/65167
* gcc/config/i386/i386.c (ix86_function_arg_regno_p): Support
bounds registers.
(avoid_func_arg_motion): Add dependencies for BNDSTX insns.

gcc/testsuite/

PR target/65167
* gcc.target/i386/pr65167.c: New.


Added:
trunk/gcc/testsuite/gcc.target/i386/pr65167.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/65209] [5 Regression] Broken code with global static variables, invalid pointer when freeing global variables

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

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-02-25
  Known to work||4.9.2
   Target Milestone|--- |5.0
Summary|[5.0 regression] Broken |[5 Regression] Broken code
   |code with global static |with global static
   |variables, invalid pointer  |variables, invalid pointer
   |when freeing global |when freeing global
   |variables   |variables
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
Confirmed.  Valgrind says

==23580== Invalid free() / delete / delete[] / realloc()
==23580==at 0x4C28FAC: operator delete(void*) (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23580==by 0x4009D4: FooData::~FooData() (foo.cpp:5)
==23580==by 0x400A13: Foo::~Foo() (foo.cpp:8)
==23580==by 0x400A4B: FooSingleton::~FooSingleton() (foo.cpp:15)
==23580==by 0x400AA2: (anonymous
namespace)::Q_QGS_s_self::innerFunction()::Holder::~Holder() (foo.cpp:33)
==23580==by 0x5704058: __run_exit_handlers (exit.c:82)
==23580==by 0x57040A4: exit (exit.c:104)
==23580==by 0x56EDBEB: (below main) (libc-start.c:303)
==23580==  Address 0x5a80001 is 24,513 bytes inside a block of size 72,704
alloc'd
==23580==at 0x4C277AB: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23580==by 0x4EC31AF: ??? (in /usr/lib64/libstdc++.so.6.0.21)
==23580==by 0x400E859: call_init.part.0 (dl-init.c:84)
==23580==by 0x400E942: _dl_init (dl-init.c:36)
==23580==by 0x40011C9: ??? (in /lib64/ld-2.18.so)


[Bug c++/65211] New: Type alignment lost inside templated function

2015-02-25 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65211

Bug ID: 65211
   Summary: Type alignment lost inside templated function
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: linux at carewolf dot com

Created attachment 34871
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34871action=edit
C++ source

A specific combination of local typedef inside a templated function causes gcc
to lose or ignore the aligment of a vector.


[Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212

Kai Tietz ktietz at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #10 from Kai Tietz ktietz at gcc dot gnu.org ---
Fixed.


[Bug c++/65209] [5 Regression] Broken code with global static variables, invalid pointer when freeing global variables

2015-02-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65209

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1

--- Comment #4 from Jakub Jelinek jakub at gcc dot gnu.org ---
Exported symbols like
_ZZN12_GLOBAL__N_112Q_QGS_s_self13innerFunctionEvEN6HolderC1Ev
look very much wrong to me, anonymous namespace shouldn't be visible to other
TUs.  Similarly, sections containing such symbols shouldn't be linkonce.


[Bug tree-optimization/65204] Aligned address optimization not detected

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65204

--- Comment #2 from Kai Tietz ktietz at gcc dot gnu.org ---
Author: ktietz
Date: Wed Feb 25 16:28:28 2015
New Revision: 220981

URL: https://gcc.gnu.org/viewcvs?rev=220981root=gccview=rev
Log:
Precommit code-change of patch by Richard Biener for gcc 6.0

2015-02-25  Richard Biener  rguent...@suse.de

PR tree-optimization/65204
* tree-ssa-ccp.c (evaluate_stmt): Always evaluate address
takens for bit-CCP.


Modified:
branches/c++-delayed-folding/gcc/tree-ssa-ccp.c


[Bug c++/65209] [5 Regression] Broken code with global static variables, invalid pointer when freeing global variables

2015-02-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65209

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org ---
Started with r213307


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #16 from Jakub Jelinek jakub at gcc dot gnu.org ---
I certainly can reproduce it, the problem is that reduc_def_stmt is NULL.
dt is vect_constant_def.


[Bug c++/65211] Type alignment lost inside templated function

2015-02-25 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65211

--- Comment #4 from Allan Jensen linux at carewolf dot com ---
Note either removing the template argument or moving the typedef out of the
function both solve the issue, and makes gcc use an unaligned load.


[Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212

--- Comment #8 from Kai Tietz ktietz at gcc dot gnu.org ---
Author: ktietz
Date: Wed Feb 25 16:44:26 2015
New Revision: 220982

URL: https://gcc.gnu.org/viewcvs?rev=220982root=gccview=rev
Log:
PR target/64212
* symtab.c (symtab::make_decl_local): Set DECL_IMPORT_P explicit to 0.
(symtab::noninterposable_alias): Likewise.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/symtab.c


[Bug target/65212] New: --with-arch=nocona and -msse3

2015-02-25 Thread dilyan.palauzov at aegee dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65212

Bug ID: 65212
   Summary: --with-arch=nocona and -msse3
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dilyan.palauzov at aegee dot org

At
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options
is written:

‘nocona’
Improved version of Intel Pentium 4 CPU with 64-bit extensions, MMX, SSE,
SSE2 and SSE3 instruction set support. 

I ./configure gcc with --with-arch=nocona, and running afterwards

`gcc -Q --help=target` I get (among other things):
  -march=   nocona
  -mmmx [disabled]
  -msse [disabled]
  -msse2[disabled]
  -msse2avx [disabled]
  -msse3[disabled]

Provided that gcc is instructed to generate code for Intel Nocona, which has
SSE3, why is the -msse3 directive not enabled automatically?

I expect here to have SSE2 enabled automatically, as under this circumstances
(code for Nocona) I do not see a point to disable it.

[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #11 from H.J. Lu hjl.tools at gmail dot com ---
(In reply to Kai Tietz from comment #10)
 Fixed on trunk and 4.9

The fix caused:

FAIL: gcc.dg/pr56350.c (internal compiler error)
FAIL: gcc.dg/pr56350.c (test for excess errors)

[hjl@gnu-6 gcc]$ ./xgcc -B./ -O -ftree-vectorize
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.dg/pr56350.c
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.dg/pr56350.c: In
function ‘f’:
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.dg/pr56350.c:8:1:
internal compiler error: Segmentation fault
 f (void)
 ^
0xd1f836 crash_signal
/export/gnu/import/git/sources/gcc/gcc/toplev.c:383
0xfaf59a gimple_code
/export/gnu/import/git/sources/gcc/gcc/gimple.h:1553
0xfbd855 vectorizable_reduction(gimple_statement_base*,
gimple_stmt_iterator*, gimple_statement_base**, _slp_tree*)
/export/gnu/import/git/sources/gcc/gcc/tree-vect-loop.c:4987
0xfabc86 vect_analyze_stmt(gimple_statement_base*, bool*, _slp_tree*)
/export/gnu/import/git/sources/gcc/gcc/tree-vect-stmts.c:7170
0xfb50c9 vect_analyze_loop_operations
/export/gnu/import/git/sources/gcc/gcc/tree-vect-loop.c:1539
0xfb58cc vect_analyze_loop_2
/export/gnu/import/git/sources/gcc/gcc/tree-vect-loop.c:1800
0xfb5c70 vect_analyze_loop(loop*)
/export/gnu/import/git/sources/gcc/gcc/tree-vect-loop.c:1898
0xfd558f vectorize_loops()
/export/gnu/import/git/sources/gcc/gcc/tree-vectorizer.c:451
0xed3699 execute
/export/gnu/import/git/sources/gcc/gcc/tree-ssa-loop.c:295
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.
[hjl@gnu-6 gcc]$

on trunk.

[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #12 from Kai Tietz ktietz at gcc dot gnu.org ---
Hmm, just retested it for gcc's trunk.  Can't reproduce it.  I will retest with
current trunk, I might have a different patch in tree, which makes the
difference here.
Additionally, what target you are using?


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #13 from H.J. Lu hjl.tools at gmail dot com ---
(In reply to Kai Tietz from comment #12)
 Hmm, just retested it for gcc's trunk.  Can't reproduce it.  I will retest
 with current trunk, I might have a different patch in tree, which makes the
 difference here.
 Additionally, what target you are using?

Also happened on 4.9 branch:

[hjl@gnu-6 gcc]$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: x86_64-unknown-linux-gnu
Configured with: /export/gnu/import/git/sources/gcc/configure
--enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-5.0.0
--with-local-prefix=/usr/local --enable-gnu-indirect-function --with-fpmath=sse
Thread model: posix
gcc version 5.0.0 20150225 (experimental) (GCC) 
[hjl@gnu-6 gcc]$


[Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212

--- Comment #9 from Kai Tietz ktietz at gcc dot gnu.org ---
Author: ktietz
Date: Wed Feb 25 16:46:34 2015
New Revision: 220983

URL: https://gcc.gnu.org/viewcvs?rev=220983root=gccview=rev
Log:
Merged from mainline
PR target/64212
* symtab.c (symtab::make_decl_local): Set DECL_IMPORT_P explicit to 0.
(symtab::noninterposable_alias): Likewise.


Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/symtab.c


[Bug c++/65198] [4.9 Regression] User-defined literal template inside generic lambda segfaults

2015-02-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65198

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
  Known to work||5.0
   Target Milestone|5.0 |4.9.3
Summary|[5 Regression] User-defined |[4.9 Regression]
   |literal template inside |User-defined literal
   |generic lambda segfaults|template inside generic
   |GCC 5.0 |lambda segfaults
  Known to fail||4.9.2


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #14 from Kai Tietz ktietz at gcc dot gnu.org ---
(In reply to H.J. Lu from comment #13)
 (In reply to Kai Tietz from comment #12)
  Hmm, just retested it for gcc's trunk.  Can't reproduce it.  I will retest
  with current trunk, I might have a different patch in tree, which makes the
  difference here.
  Additionally, what target you are using?
 
 Also happened on 4.9 branch:

So for me it doesn't happen on trunk, so the Also seems to me something
special for you.  I will recheck 4.9, as here we might have a regression I
didn't caught ...


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #15 from H.J. Lu hjl.tools at gmail dot com ---
(In reply to Kai Tietz from comment #14)
 (In reply to H.J. Lu from comment #13)
  (In reply to Kai Tietz from comment #12)
   Hmm, just retested it for gcc's trunk.  Can't reproduce it.  I will retest
   with current trunk, I might have a different patch in tree, which makes 
   the
   difference here.
   Additionally, what target you are using?
  
  Also happened on 4.9 branch:
 
 So for me it doesn't happen on trunk, so the Also seems to me something
 special for you.  I will recheck 4.9, as here we might have a regression I
 didn't caught ...

I don't know why you didn't see it:

Starting program: /export/build/gnu/gcc-4.9/build-x86_64-linux/gcc/cc1
-fpreprocessed /tmp/x.i -quiet -dumpbase x.i -mtune=generic -march=x86-64
-auxbase x -O -version -ftree-vectorize -o x.i
GNU C (GCC) version 4.9.3 20150225 (prerelease) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.8.3 20140911 (Red Hat 4.8.3-7), GMP version
5.1.2, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.9.3 20150225 (prerelease) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.8.3 20140911 (Red Hat 4.8.3-7), GMP version
5.1.2, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e64a271cb64a39ff067a5fd30c57a8d9

Program received signal SIGSEGV, Segmentation fault.
0x00c1efa1 in gimple_code (g=0x0)
at /export/gnu/import/git/gcc-release/gcc/gimple.h:1406
1406  return g-code;
(gdb) bt
#0  0x00c1efa1 in gimple_code (g=0x0)
at /export/gnu/import/git/gcc-release/gcc/gimple.h:1406
#1  0x00c2bc5d in vectorizable_reduction (
stmt=gimple_assign 0x719e, gsi=0x0, vec_stmt=0x0, slp_node=0x0)
at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:4915
#2  0x00c1bcca in vect_analyze_stmt (
stmt=gimple_assign 0x719e, need_to_vectorize=0x7fffd6af, 
node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-stmts.c:7107
#3  0x00c1b723 in vect_analyze_stmt (
stmt=gimple_assign 0x719d32c0, need_to_vectorize=0x7fffd6af, 
node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-stmts.c:7023
#4  0x00c24048 in vect_analyze_loop_operations (loop_vinfo=0x1a75950, 
slp=false) at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:1505
#5  0x00c247ee in vect_analyze_loop_2 (loop_vinfo=0x1a75950)
at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:1766
#6  0x00c24b73 in vect_analyze_loop (loop=0x719d50a0)
at /export/gnu/import/git/gcc-release/gcc/tree-vect-loop.c:1864
#7  0x00c41516 in vectorize_loops ()
at /export/gnu/import/git/gcc-release/gcc/tree-vectorizer.c:430
#8  0x00b713d3 in tree_loop_vectorize ()
at /export/gnu/import/git/gcc-release/gcc/tree-ssa-loop.c:154
#9  0x00b7145d in (anonymous namespace)::pass_vectorize::execute (
this=0x1a20150)
---Type return to continue, or q return to quit---
at /export/gnu/import/git/gcc-release/gcc/tree-ssa-loop.c:189
#10 0x0095dde6 in execute_one_pass (
pass=opt_pass* 0x1a20150 vect(119))
at /export/gnu/import/git/gcc-release/gcc/passes.c:2233
#11 0x0095dfff in execute_pass_list (
pass=opt_pass* 0x1a20150 vect(119))
at /export/gnu/import/git/gcc-release/gcc/passes.c:2286
#12 0x0095e030 in execute_pass_list (
pass=opt_pass* 0x1a1fa30 loop(101))
at /export/gnu/import/git/gcc-release/gcc/passes.c:2287
#13 0x0095e030 in execute_pass_list (
pass=opt_pass* 0x1a1e950 *all_optimizations(-1))
at /export/gnu/import/git/gcc-release/gcc/passes.c:2287
#14 0x006bb569 in expand_function (
node=cgraph_node* 0x718a9e18 f)
at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:1774
#15 0x006bb9ca in expand_all_functions ()
at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:1908
#16 0x006bc2ed in compile ()
at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:2252
#17 0x006bc3c8 in finalize_compilation_unit ()
at /export/gnu/import/git/gcc-release/gcc/cgraphunit.c:2329
#18 0x005817c7 in c_write_global_declarations ()
---Type return to continue, or q return to quit---q
 at /export/gnu/import/gQuit
(gdb) f 2
#2  0x00c1bcca in vect_analyze_stmt (
stmt=gimple_assign 0x719e, need_to_vectorize=0x7fffd6af, 
node=0x0) at /export/gnu/import/git/gcc-release/gcc/tree-vect-stmts.c:7107
7107|| vectorizable_reduction (stmt, NULL, NULL, NULL)
(gdb) call debug_gimple_stmt (stmt)
patt_25 = a_lsm.8_11  0 ? 7 : 0;
(gdb) f 1
#1  0x00c2bc5d in vectorizable_reduction (
stmt=gimple_assign 0x719e, gsi=0x0, vec_stmt=0x0, slp_node=0x0)
at /export/gnu/import/git/gcc

[Bug target/47230] [4.6 Regression] gcc fails to bootstrap on alpha in stage2 with relocation truncated to fit: GPREL16 against ...

2015-02-25 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47230

--- Comment #25 from uros at gcc dot gnu.org ---
Author: uros
Date: Wed Feb 25 19:59:31 2015
New Revision: 220990

URL: https://gcc.gnu.org/viewcvs?rev=220990root=gccview=rev
Log:
Revert:
2014-07-26  Uros Bizjak  ubiz...@gmail.com

PR target/47230
* configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
* configure: Regenerate.

/config

Revert:
2014-07-26  Uros Bizjak  ubiz...@gmail.com

PR target/47230
* mh-alpha-linux: New file.

/gcc

PR target/47230
* doc/install.texi (Specific, alpha*-*-*): Document that binutils 2.25
or newer are required.


Removed:
trunk/config/mh-alpha-linux
Modified:
trunk/ChangeLog
trunk/config/ChangeLog
trunk/configure
trunk/configure.ac
trunk/gcc/ChangeLog
trunk/gcc/doc/install.texi


[Bug libfortran/65200] Handle EPERM when opening files

2015-02-25 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65200

Jerry DeLisle jvdelisle at gcc dot gnu.org changed:

   What|Removed |Added

 CC||tkoenig at gcc dot gnu.org

--- Comment #1 from Jerry DeLisle jvdelisle at gcc dot gnu.org ---
*** Bug 65203 has been marked as a duplicate of this bug. ***


[Bug lto/65130] [5 Regression] ICE with LTO on valid code on x86_64-linux-gnu

2015-02-25 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65130

Aldy Hernandez aldyh at gcc dot gnu.org changed:

   What|Removed |Added

 CC||aldyh at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |aldyh at gcc dot gnu.org

--- Comment #2 from Aldy Hernandez aldyh at gcc dot gnu.org ---
I'll take a stab at analyzing.  If anyone else is analyzing, please say so, to
avoid duplicating effort.


[Bug target/64833] [SH]: Error: pcrel too far when compiling imagemagick and graphicsmagick on Debian sh4

2015-02-25 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64833

--- Comment #4 from Oleg Endo olegendo at gcc dot gnu.org ---
Ping.  Precompiled source to reproduce the problem is still missing here.


[Bug target/47230] [4.6 Regression] gcc fails to bootstrap on alpha in stage2 with relocation truncated to fit: GPREL16 against ...

2015-02-25 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47230

--- Comment #26 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to uros from comment #25)

The linker bug [1] was fixed in binutils 2.25 and GCC workaround was removed
for gcc 5.0.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=5276

[Bug libfortran/65203] Document fall-back to read-only access

2015-02-25 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65203

Jerry DeLisle jvdelisle at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||jvdelisle at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #1 from Jerry DeLisle jvdelisle at gcc dot gnu.org ---
This is the same issue as in PR65200.  One suggests documentation and some code
changes.  Making this as duplicate and will add documentation to the other.

*** This bug has been marked as a duplicate of bug 65200 ***


[Bug libfortran/65200] Handle EPERM when opening files

2015-02-25 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65200

Jerry DeLisle jvdelisle at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jvdelisle at gcc dot gnu.org

--- Comment #2 from Jerry DeLisle jvdelisle at gcc dot gnu.org ---
From PR65203 Thomas comment:

Currently, when encountering EACCES or EROFS upon opening, we fall back towards
opening the file read-only.

This is

a) not documented
b) surprising for some users (an inconsistency has been commented upon)
c) causes inconsistencies with NFS v4, which appears to return EPERM for a
read-only file for no reason that I can see.

The original report can be found at
http://stackoverflow.com/questions/28696539/fortran-open-call-differs-on-nfsv3-vs-nfsv4
.

My suggestion would be to a) document and c) extend the behavior to EPERM.


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #19 from Kai Tietz ktietz at gcc dot gnu.org ---
Author: ktietz
Date: Wed Feb 25 18:21:37 2015
New Revision: 220987

URL: https://gcc.gnu.org/viewcvs?rev=220987root=gccview=rev
Log:
PR tree-optimization/61917
* tree-vect-loop.c (vectorizable_reduction): Handle obvious case
that reduc_def_stmt is null.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-loop.c


[Bug sanitizer/65148] ICE: in get_biv_step, at loop-iv.c:823

2015-02-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65148

--- Comment #5 from Marek Polacek mpolacek at gcc dot gnu.org ---
Fixed on trunk by r217758.


[Bug c/65213] New: Extend -Wmissing-declarations to variables

2015-02-25 Thread eugene.zelenko at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65213

Bug ID: 65213
   Summary: Extend -Wmissing-declarations to variables
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eugene.zelenko at gmail dot com

Will be good idea to -Wmissing-declarations to variables. Global variable
should have extern declaration in header file, otherwise variable should be
static.

Clang detect such situations with -Wmissing-variable-declarations.

Same should be done for C++.


[Bug testsuite/63175] [4.9/5 regression] FAIL: gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c scan-tree-dump-times slp2 basic block vectorized using SLP 1

2015-02-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63175

--- Comment #7 from Martin Sebor msebor at gcc dot gnu.org ---
The regression was introduced in this commit:

commit 9eec20bfd5806dd0380e07dbc0f03409ce3d4efb
Author: rguenth rguenth@138bc75d-0d04-0410-961f-82ee72b054a4
Date:   Tue Mar 26 09:14:59 2013 +

2013-03-26  Richard Biener  rguent...@suse.de

* emit-rtl.c (set_mem_attributes_minus_bitpos): Remove
alignment computations and rely on get_object_alignment_1
for the !TYPE_P case.
Commonize DECL/COMPONENT_REF handling in the ARRAY_REF path.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197095
138bc75d-0d04-0410-961f-82ee72b054a4


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #17 from Kai Tietz ktietz at gcc dot gnu.org ---
Just posted a fix.  For the 4.9 branch I could finally reproduce this error. 
It is caused by the PHI-check for a vector-constant, which obviously has no
valid statment ...


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #18 from Kai Tietz ktietz at gcc dot gnu.org ---
Author: ktietz
Date: Wed Feb 25 18:20:34 2015
New Revision: 220986

URL: https://gcc.gnu.org/viewcvs?rev=220986root=gccview=rev
Log:
2015-02-25  Kai Tietz  kti...@redhat.com

PR tree-optimization/61917
* tree-vect-loop.c (vectorizable_reduction): Handle obvious case
that reduc_def_stmt is null.


Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/tree-vect-loop.c


[Bug target/65171] [5 Regression] r214254 causes thousands of std::length_errors running boost testsuite on ppc64le

2015-02-25 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65171

--- Comment #3 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Problem is an invalid swap removal in:

bool boost::test_tools::tt_detail::report_assertion(const
boost::test_tools::as\
sertion_result, const boost::unit_test::lazy_ostream,
boost::unit_test::const\
_string, std::size_t, boost::test_tools::tt_detail::tool_level,
boost::test_too\
ls::tt_detail::check_type, std::size_t, ...)

Something going on with subreg handling.


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

--- Comment #20 from Kai Tietz ktietz at gcc dot gnu.org ---
HJ: Does recent patch fixes issue for you too?


[Bug target/64833] [SH]: Error: pcrel too far when compiling imagemagick and graphicsmagick on Debian sh4

2015-02-25 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64833

--- Comment #5 from John Paul Adrian Glaubitz glaubitz at physik dot 
fu-berlin.de ---
(In reply to Oleg Endo from comment #4)
 Ping.  Precompiled source to reproduce the problem is still missing here.

I will try to provide it in the following days. For both imagemagick and
graphicsmagick, there was no intermediate source file dumped into /tmp so I
have to start a manual build.

Thanks for the heads up, I will get the required files.

Adrian


[Bug tree-optimization/65177] [5 Regression]: extend jump thread for finite state automata causes miscompilation

2015-02-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65177

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-02-25
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #5 from Marek Polacek mpolacek at gcc dot gnu.org ---
Thus confirmed.


[Bug sanitizer/65112] [5 Regression] -fsanitized=thread Fortran program crashes at startup

2015-02-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65112

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek mpolacek at gcc dot gnu.org ---
Can't reproduce either:

./gfortran -B ./ -B ../x86_64-unknown-linux-gnu/libgfortran/ -B
../x86_64-unknown-linux-gnu/libgomp/ -fsanitize=thread -fopenmp -gdwarf-3 -fPIE
-pie -fno-omit-frame-pointer main.f90 -L
../x86_64-unknown-linux-gnu/libquadmath/.libs/ -L
../x86_64-unknown-linux-gnu/libsanitizer/tsan/.libs/ -L
../x86_64-unknown-linux-gnu/libgomp/.libs/ -L
../x86_64-unknown-linux-gnu/libgfortran/.libs/ ; ./a.out


[Bug target/65171] [5 Regression] r214254 causes thousands of std::length_errors running boost testsuite on ppc64le

2015-02-25 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65171

--- Comment #4 from Bill Schmidt wschmidt at gcc dot gnu.org ---
The logic to avoid subregs of TImode wasn't getting executed.  I have a patch
that fixes this; doing regression testing and then will get it submitted to the
list.  Still working in the background on reducing the test case. :/


[Bug tree-optimization/61917] [4.9 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913

2015-02-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #21 from H.J. Lu hjl.tools at gmail dot com ---
Fixed.


[Bug lto/65130] [5 Regression] ICE with LTO on valid code on x86_64-linux-gnu

2015-02-25 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65130

Aldy Hernandez aldyh at gcc dot gnu.org changed:

   What|Removed |Added

   Assignee|aldyh at gcc dot gnu.org   |unassigned at gcc dot 
gnu.org

--- Comment #3 from Aldy Hernandez aldyh at gcc dot gnu.org ---
Returning to queue, as Kai Tietz is looking at this with Honza.


[Bug target/65214] New: [SH] Optimize sign/zero extensions across basic blocks

2015-02-25 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65214

Bug ID: 65214
   Summary: [SH] Optimize sign/zero extensions across basic blocks
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: olegendo at gcc dot gnu.org
Target: sh*-*-*

This is an example from gcc.c-torture/execute/pr20187-1.c:

int a = 0x101;
int b = 0x100;

int
test (void)
{
  return (((unsigned char) (unsigned long long) ((a ? a : 1)  (a * b)))
  ? 0 : 1);
}

compiled with -m4 -ml -O2 -fdisable-rtl-dbr:

mov.l   .L6,r1
mov.l   @r1,r2
mov #1,r1 // r1 is zero extended after constant load
tst r2,r2
bt  .L2
exts.b  r2,r1
.L2:
mov.l   .L7,r3
extu.b  r1,r1 // r1 = extu.b (exts.b (r2))
mov.l   @r3,r3
mulu.w  r2,r3
sts macl,r3
tst r3,r1
movtr0
rts
nop

The extu.b basically overrides result of exts.b.  Thus we can replace the
exts.b with extu.b and eliminate one insn:

mov.l   .L6,r1
mov.l   @r1,r2
mov #1,r1
tst r2,r2
bt  .L2
extu.b  r2,r1
.L2:
mov.l   .L7,r3
mov.l   @r3,r3
mulu.w  r2,r3
sts macl,r3
tst r3,r1
movtr0
rts
nop


[Bug lto/65130] [5 Regression] ICE with LTO on valid code on x86_64-linux-gnu

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65130

Kai Tietz ktietz at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ktietz at gcc dot gnu.org

--- Comment #4 from Kai Tietz ktietz at gcc dot gnu.org ---
Created attachment 34876
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34876action=edit
Suggested patch avoiding endless-recursing by hash_set for visted edges

The patch solves the reported issue for me on x86_64-unknown-linux-gnu.
It avoids that we recurse within functions we already visited.
While working on this I noticed that code uses pretty much stack due passing
vecs' as copy on stack.  This makes especially on targets with fixed amount of
stack seriously troubles.  But well, this is nothing to address by this patch


[Bug bootstrap/65150] [5 Regression] r220875 causes bootstrap failure on x86_64 darwin

2015-02-25 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65150

--- Comment #21 from Iain Sandoe iains at gcc dot gnu.org ---
(In reply to Jan Hubicka from comment #20)
 Created attachment 34864 [details]
 icfmerge2
 
 Updated version to apply after Jakub's patch

this bootstraps on x86_64-darwin12, and powerpc-darwin9 (at least).

in addition to new test failures seen with previous patches (FAIL:
gcc.dg/attr-noinline.c, FAIL: gcc.dg/ipa/iinline-5.c scan-ipa-dump-not inline
wrong_target[^n]*inline copy in)

we also see :
FAIL: g++.dg/warn/Wsuggest-final.C  -std=gnu++11  (test for warnings, line 3)
(also, as expected, for c++98, c++14)

== looks like:

GCC/gcc-trunk/gcc/testsuite/g++.dg/warn/Wsuggest-final.C:3:8: warning:
Declaring type 'struct A' final would enable devirtualization of 2 calls
[-Wsuggest-final-types]
/GCC/gcc-trunk/gcc/testsuite/g++.dg/warn/Wsuggest-final.C:5:15: warning:
Declaring method 'virtual void A::b()' final would enable devirtualization of 2
calls [-Wsuggest-final-methods]
output is:
/GCC/gcc-trunk/gcc/testsuite/g++.dg/warn/Wsuggest-final.C:3:8: warning:
Declaring type 'struct A' final would enable devirtualization of 2 calls
[-Wsuggest-final-types]
/GCC/gcc-trunk/gcc/testsuite/g++.dg/warn/Wsuggest-final.C:5:15: warning:
Declaring method 'virtual void A::b()' final would enable devirtualization of 2
calls [-Wsuggest-final-methods]

FAIL: g++.dg/warn/Wsuggest-final.C  -std=gnu++11  (test for warnings, line 3)
FAIL: g++.dg/warn/Wsuggest-final.C  -std=gnu++11  (test for warnings, line 4)
PASS: g++.dg/warn/Wsuggest-final.C  -std=gnu++11  (test for warnings, line 5)
FAIL: g++.dg/warn/Wsuggest-final.C  -std=gnu++11 (test for excess errors)
Excess errors:
/GCC/gcc-trunk/gcc/testsuite/g++.dg/warn/Wsuggest-final.C:3:8: warning:
Declaring type 'struct A' final would enable devirtualization of 2 calls
[-Wsuggest-final-types]

==

there might be possibly be other related [C] fails - it's actually tricky to
get a clean baseline, since this PR is caused by a fix to a related one.


[Bug lto/65130] [5 Regression] ICE with LTO on valid code on x86_64-linux-gnu

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65130

Kai Tietz ktietz at gcc dot gnu.org changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |ktietz at gcc dot 
gnu.org

--- Comment #5 from Kai Tietz ktietz at gcc dot gnu.org ---
Mine, for now


[Bug tree-optimization/65177] [5 Regression]: extend jump thread for finite state automata causes miscompilation

2015-02-25 Thread spop at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65177

Sebastian Pop spop at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |UNCONFIRMED
   Last reconfirmed|2015-02-25 00:00:00 |
 Ever confirmed|1   |0

--- Comment #6 from Sebastian Pop spop at gcc dot gnu.org ---
The SEME region copier does not update the SSA correctly:

bb_53:
  # i_1 = PHI i_126(13), i_250(52)
  # sprv_5 = PHI sprv_137(13), sprv_284(52)
  # .MEM_7 = PHI .MEM_331(13), .MEM_337(52)
  # k_339 = PHI k_84(13), k_285(52)
  # sprv_780 = PHI 1(13), 7(52)

bb_104 is a copy of bb_53:
  # i_672 = PHI i_126(13)
  # sprv_437 = PHI sprv_137(13)
  # .MEM_715 = PHI .MEM_331(13)
  # k_716 = PHI k_84(13)
  # sprv_717 = PHI 1(13)


bb_64:
  # _319 = PHI 0.0(55), 0.0(58), _313(61)
  # sprv_751 = PHI sprv_5(55), 5(58), 8(61)
  # i_769 = PHI i_1(55), i_766(58), i_767(61)
  # sprv_784 = PHI sprv_780(55), sprv_781(58), 8(61)
  # k_790 = PHI k_339(55), k_787(58), k_788(61)
  # .MEM_810 = PHI .MEM_7(55), .MEM_807(58), .MEM_808(61)

bb_106 a copy of bb_64:
  # _594 = PHI 0.0(105)
  # sprv_515 = PHI sprv_5(105)
  # i_516 = PHI i_1(105)
  # sprv_567 = PHI sprv_780(105)
  # k_541 = PHI k_339(105)
  # .MEM_619 = PHI .MEM_7(105)


In bb_106, a copy of bb_64,
- # sprv_567 = PHI sprv_780(105)
  we use the old value sprv_780 instead of the new value sprv_717 set in
bb_105:

- # sprv_515 = PHI sprv_5(105)
  we use the old value sprv_5 instead of the new value sprv_437:


[Bug c++/65209] [5 Regression] Broken code with global static variables, invalid pointer when freeing global variables

2015-02-25 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65209

--- Comment #5 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Wed Feb 25 21:46:29 2015
New Revision: 220991

URL: https://gcc.gnu.org/viewcvs?rev=220991root=gccview=rev
Log:
PR c++/65209
* decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
DECL_COMDAT.
(constrain_visibility_for_template): Handle reference arguments.

Added:
trunk/gcc/testsuite/g++.dg/abi/anon4.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c


[Bug target/65171] [5 Regression] r214254 causes thousands of std::length_errors running boost testsuite on ppc64le

2015-02-25 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65171

--- Comment #5 from Bill Schmidt wschmidt at gcc dot gnu.org ---
Patch submitted at https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01550.html.


[Bug libstdc++/64967] [5 Regression] Bootstrap fails due to errors in libstdc++ sources with `--enable-symvers=gnu-versioned-namespace'

2015-02-25 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64967

Jeffrey A. Law law at redhat dot com changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

--- Comment #3 from Jeffrey A. Law law at redhat dot com ---
P4 seems more appropriate given how few people use gnu-versioned-namespace.


[Bug ipa/59948] Optimize std::function

2015-02-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59948

--- Comment #7 from Marc Glisse glisse at gcc dot gnu.org ---
There has been huge progress in gcc-5:

int m() ()
{
  struct function h;

  bb 2:
  MEM[(int (*T5c6a) (int) *)h] = f;
  h._M_invoker = _M_invoke;
  h.D.27699._M_manager = _M_manager;
  std::_Function_base::_Base_managerint (*)(int)::_M_manager (MEM[(struct
_Function_base *)h]._M_functor, MEM[(struct _Function_base *)h]._M_functor,
3);
  h ={v} {CLOBBER};
  return 0;

}

Apparently we managed to inline f! For this simple testcase, all that is
missing is inlining _M_manager to realize that when the last argument is 3 it
does nothing. Then we can go back to more complicated examples like the one
linked at the end of comment #0.


[Bug c/65217] __builtin_unreachable in if statement causes bad assembly generation

2015-02-25 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65217

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Andrew Pinski pinskia at gcc dot gnu.org ---
Fixed on the trunk for GCC 5:
expected:
.LFB0:
.cfi_startproc
movl%edi, %eax
ret
...
test:
.LFB1:
.cfi_startproc
movl%edi, %eax
ret


[Bug c++/62255] [4.8/4.9 Regression] Introducing an unrelated template parameter causes compilation to fail

2015-02-25 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62255

--- Comment #12 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Thu Feb 26 02:43:58 2015
New Revision: 220997

URL: https://gcc.gnu.org/viewcvs?rev=220997root=gccview=rev
Log:
PR c++/62255
* pt.c (instantiate_decl): Handle recursive instantiation of
static data member.

Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/template/recurse4.C
Modified:
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/pt.c


[Bug c/65217] New: __builtin_unreachable in if statement causes bad assembly generation

2015-02-25 Thread sumnon at cj3 dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65217

Bug ID: 65217
   Summary: __builtin_unreachable in if statement causes bad
assembly generation
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sumnon at cj3 dot org

Test case:

int expected(int n) {
return n;
}

int test(int n) {
if ((n  -n) != n) {
__builtin_unreachable();
}
return n;
}

gcc -O3 -S test.c generates this:

.filetest.c
.text
.p2align 4,,15
.globlexpected
.typeexpected, @function
expected:
.LFB0:
.cfi_startproc
movl%edi, %eax
ret
.cfi_endproc
.LFE0:
.sizeexpected, .-expected
.p2align 4,,15
.globltest
.typetest, @function
test:
.LFB1:
.cfi_startproc
movl%edi, %eax
negl%eax
andl%edi, %eax
ret
.cfi_endproc
.LFE1:
.sizetest, .-test
.identGCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-7)
.section.note.GNU-stack,,@progbits

These functions should generate the same assembly, since the if statement in
function test does nothing that affects the return value.

I have and tested this with gcc 4.8.3; a friend tested this with gcc 4.9.2 and
got the same assembly.


[Bug tree-optimization/64946] [AArch64] gcc.target/aarch64/vect-abs-compile.c - abs vectorization fails for char/short types

2015-02-25 Thread vekumar at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946

vekumar at gcc dot gnu.org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #3 from vekumar at gcc dot gnu.org ---
Richard, 

As per your suggestion, adding a pattern for type demotion in match.pd solves
this.

(simplify
 ( convert (abs (convert@1 @0)))
 ( if (INTEGRAL_TYPE_P (type)
  /* We check for type compatibility between @0 and @1 below,
 so there's no need to check that @1/@3 are integral types.  */
   INTEGRAL_TYPE_P (TREE_TYPE (@0))
   INTEGRAL_TYPE_P (TREE_TYPE (@1))
  /* The precision of the type of each operand must match the
 precision of the mode of each operand, similarly for the
 result.  */
   (TYPE_PRECISION (TREE_TYPE (@0))
  == GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (@0
   (TYPE_PRECISION (TREE_TYPE (@1))
  == GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (@1
   TYPE_PRECISION (type) == GET_MODE_PRECISION (TYPE_MODE (type))
  /* The inner conversion must be a widening conversion.  */
   TYPE_PRECISION (TREE_TYPE (@1))  TYPE_PRECISION (TREE_TYPE (@0))
   ((GENERIC
(TYPE_MAIN_VARIANT (TREE_TYPE (@0))
   == TYPE_MAIN_VARIANT (type)))
  || (GIMPLE
   types_compatible_p (TREE_TYPE (@0), type
   (abs @0)))


I have not yet tested it. Will it have implication on targets that does not
support vectorization with short/char types?


[Bug tree-optimization/64946] [AArch64] gcc.target/aarch64/vect-abs-compile.c - abs vectorization fails for char/short types

2015-02-25 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946

--- Comment #5 from Andrew Pinski pinskia at gcc dot gnu.org ---
I think you should always use an unsigned type here so it will be defined in
the IR.  This is mentioned in bug 22199#c3 .


[Bug tree-optimization/65216] wrong code at -O3 on x86_64-linux-gnu

2015-02-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65216

--- Comment #2 from Marc Glisse glisse at gcc dot gnu.org ---
The ranges are wrong before VRP2. Reassoc2 does something suspicious...


[Bug tree-optimization/65215] New: [5 Regression] Bswap load miscompilation

2015-02-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65215

Bug ID: 65215
   Summary: [5 Regression] Bswap load miscompilation
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: jakub at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org

Starting with r210843, following testcase is miscompiled on big-endian e.g. at
-O2:
static inline unsigned int
foo (unsigned int x)
{
  return (x  24) | ((x  8)  0xFF00) | ((x  8)  0xFF) | (x  24);
}

__attribute__((noinline, noclone)) unsigned int
bar (unsigned long *x)
{
  return foo (*x);
}

int
main ()
{
  unsigned long l = foo (0xdeadbeefU) | 0xfeedbea8ULL;
  if (bar (l) != 0xdeadbeefU)
__builtin_abort ();
  return 0;
}


[Bug tree-optimization/65215] [5 Regression] Bswap load miscompilation

2015-02-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65215

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-02-25
   Target Milestone|--- |5.0
 Ever confirmed|0   |1


[Bug c++/65209] [5 Regression] Broken code with global static variables, invalid pointer when freeing global variables

2015-02-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65209

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org ---
Fixed.


[Bug tree-optimization/65216] New: wrong code at -O3 on x86_64-linux-gnu

2015-02-25 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65216

Bug ID: 65216
   Summary: wrong code at -O3 on x86_64-linux-gnu
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu

The current gcc trunk miscompiles the following code on x86_64-linux at -O3 in
both 32-bit and 64-bit modes. 

This is a regression from 4.9.x. 

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 5.0.0 20150225 (experimental) [trunk revision 220958] (GCC) 
$ 
$ gcc-trunk -O2 small.c; a.out
$ gcc-4.9 -O3 small.c; a.out
$ 
$ gcc-trunk -O3 small.c
$ ./a.out
Aborted (core dumped)
$ 


--


int a, b = 62, e;
volatile int c;
volatile int d;

int
main ()
{
  int f = a = 0;
  for (; a  2; a++)
{
  b = (8 ^ f)  1;
  for (e = 0; e  6; e++)
if (c)
  f = d;
}

  if (b != 0) 
__builtin_abort (); 

  return 0;
}


[Bug target/65138] [5 Regression] testsuite ICEs on powerpc64le

2015-02-25 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65138

--- Comment #3 from Michael Meissner meissner at gcc dot gnu.org ---
I just built a toolchain on gcc2-power8.osuosl.org with the configuration line:

/home/meissner/fsf-src/trunk/configure
--prefix=/home/meissner/fsf-install-ppcle64/trunk
--enable-languages=c,c++,ada,fortran,java,objc,obj-c++ --with-long-double-128
--enable-secureplt --enable-__cxa_atexit --disable-libsanitizer
--with-cpu=power8

And after doing a make check, install, and check, I did not see any of these
tests generate errors with -flto -fuse-linker-plugin -flto-partition=none.

What was the exact command line you used to configure the compiler, and what
was your path?


[Bug tree-optimization/65216] [5 Regression] wrong code at -O3 on x86_64-linux-gnu

2015-02-25 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65216

Kai Tietz ktietz at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |5.0


  1   2   >