[Bug rtl-optimization/64300] [5 Regression] s390x, ICE, unable to generate reloads, in curr_insn_transform, at lra-constraints.c

2015-01-14 Thread jan.kratochvil at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64300

Jan Kratochvil  changed:

   What|Removed |Added

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

--- Comment #5 from Jan Kratochvil  ---
libgcc2.i from Comment 0 builds for me now, thanks.


[Bug c/64610] New: No -Wbool-compare warning on "(0 != a) >= 0"

2015-01-14 Thread chengniansun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64610

Bug ID: 64610
   Summary: No -Wbool-compare warning on "(0 != a) >= 0"
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chengniansun at gmail dot com

There is no warning on the expression "(0 != a) >= 0". I think the cause of
this bug is different from the one I reported just now (PR64609). 


$: cat s.c
int a;
void fn1() { ((0 != a) >= 0); }
$: 
$: gcc-trunk -Wbool-compare -c s.c
$: 
$: clang-trunk -Wno-unused-value -c s.c
s.c:2:24: warning: comparison of constant 0 with boolean expression is always
  true [-Wtautological-constant-out-of-range-compare]
void fn1() { ((0 != a) >= 0); }
   ^  ~
1 warning generated.
$: 
$:


[Bug c/64609] No -Wbool-compare warning on "(a = 0 && 0) <= 4"

2015-01-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64609

Andrew Pinski  changed:

   What|Removed |Added

 Blocks||49706

--- Comment #1 from Andrew Pinski  ---
Note C the resulting type of a comparison is an integer and not a bool so this
might be causing part of the issue.

This is related to bug 49706 (which I think added -Wbool-compare, I can't keep
track of my own bugs :)).


[Bug c/64609] New: No -Wbool-compare warning on "(a = 0 && 0) <= 4"

2015-01-14 Thread chengniansun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64609

Bug ID: 64609
   Summary: No -Wbool-compare warning on "(a = 0 && 0) <= 4"
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chengniansun at gmail dot com

This might not be a bug, but a feature request. There is no -Wbool-compare
warning for the following code. 

$: cat s.c
int a;
void fn1() { ((a = 0 && 0) <= 4); }
$: 
$: gcc-trunk -c s.c -Wbool-compare
$: 
$: clang-trunk -c s.c -Wno-unused-value
s.c:2:28: warning: comparison of constant 4 with boolean expression is always
  true [-Wtautological-constant-out-of-range-compare]
void fn1() { ((a = 0 && 0) <= 4); }
   ^  ~
1 warning generated.
$: 
$:


[Bug ipa/64559] [5 Regression] ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582

2015-01-14 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64559

--- Comment #3 from Zhendong Su  ---
(In reply to Jan Hubicka from comment #2)
> Seems to be fixed by same patch as PR64068
> 
> *** This bug has been marked as a duplicate of bug 64068 ***

Jan, strictly speaking, this cannot be a duplicate of PR 64068 as they were
introduced by different revisions (r219108 for this one, and r217973 for PR
64068).


[Bug ipa/64559] [5 Regression] ICE at -Os on x86_64-linux-gnu in remove_unreachable_nodes, at ipa.c:582

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

Jan Hubicka  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Jan Hubicka  ---
Seems to be fixed by same patch as PR64068

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


[Bug ipa/64068] [5 Regression] ICE: in remove_unreachable_nodes, at ipa.c:546

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

Jan Hubicka  changed:

   What|Removed |Added

 CC||su at cs dot ucdavis.edu

--- Comment #6 from Jan Hubicka  ---
*** Bug 64559 has been marked as a duplicate of this bug. ***


[Bug fortran/61632] Memory corruption on error when writing formatted data

2015-01-14 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61632

Jerry DeLisle  changed:

   What|Removed |Added

   Severity|normal  |enhancement

--- Comment #26 from Jerry DeLisle  ---
The memory corruption is resolved, Changing to enhancement.


[Bug ipa/64068] [5 Regression] ICE: in remove_unreachable_nodes, at ipa.c:546

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

Jan Hubicka  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #5 from Jan Hubicka  ---
I am testing:

Index: ../../gcc/ipa.c
===
--- ../../gcc/ipa.c (revision 219631)
+++ ../../gcc/ipa.c (working copy)
@@ -400,7 +400,6 @@
   n = n->next_sibling_clone)
if (n->decl == DECL_ABSTRACT_ORIGIN (node->decl))
  n->used_as_abstract_origin = true;
- enqueue_node (origin_node, &first, &reachable);
}
}
  /* If any symbol in a comdat group is reachable, force


[Bug fortran/61933] Inquire on internal units

2015-01-14 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61933

Jerry DeLisle  changed:

   What|Removed |Added

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

--- Comment #6 from Jerry DeLisle  ---
Fixed on trunk.


[Bug fortran/61933] Inquire on internal units

2015-01-14 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61933

--- Comment #5 from Jerry DeLisle  ---
Author: jvdelisle
Date: Thu Jan 15 04:06:02 2015
New Revision: 219632

URL: https://gcc.gnu.org/viewcvs?rev=219632&root=gcc&view=rev
Log:
2015-01-14  Jerry DeLisle  

PR target/61933
* gfortran.dg/inquire_internal.f90: New.
* gfortran.dg/negative_unit_check.f90: New.

Added:
trunk/gcc/testsuite/gfortran.dg/inquire_internal.f90
trunk/gcc/testsuite/gfortran.dg/negative_unit_check.f90
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug fortran/61933] Inquire on internal units

2015-01-14 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61933

--- Comment #4 from Jerry DeLisle  ---
Author: jvdelisle
Date: Thu Jan 15 03:57:29 2015
New Revision: 219631

URL: https://gcc.gnu.org/viewcvs?rev=219631&root=gcc&view=rev
Log:
2015-01-14  Jerry DeLisle  

PR libgfortran/61933
* io/inquire.c (inquire_via_unit): Set existing to true if a
gfc_unit stucture was found for the given unit number.
* runtime/error.c (translate_error): Add case for
LIBERROR_INQUIRE_INTERNAL_UNIT.

Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/inquire.c
trunk/libgfortran/runtime/error.c


[Bug fortran/61933] Inquire on internal units

2015-01-14 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61933

--- Comment #3 from Jerry DeLisle  ---
Author: jvdelisle
Date: Thu Jan 15 03:51:16 2015
New Revision: 219630

URL: https://gcc.gnu.org/viewcvs?rev=219630&root=gcc&view=rev
Log:
2015-01-14  Jerry DeLisle  

PR fortran/61933
* io.c (gfc_match_inquire): Generate error if unit number in
inquire statement is a constant -1.  All other values allowed.
* trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
(create_dummy_iostat): Delete function no longer used.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/io.c
trunk/gcc/fortran/trans-io.c


[Bug libffi/64572] r219477 breaks bootstrap on x86_64 darwin

2015-01-14 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64572

--- Comment #21 from howarth at bromo dot med.uc.edu ---
One potential issue could be that src/x86/ffitarget.h has changed
FFI_TRAMPOLINE_SIZE from 10 to 12 for X86_DARWIN which is used in darwin.S...

#define RAW_CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) & ~3)

Reverting this is insufficient to eliminate the 32-bit regressions though.


[Bug bootstrap/64593] libmpfr.a undefined reference to `.L222' when doing make profiledbootstrap with bootstrap-lto

2015-01-14 Thread arnetheduck at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64593

--- Comment #3 from Jacek Sieka  ---
I've run a few more tests, and it turns out the culprit is profiledbootstrap.

'make profiledbootstrap' fails even when bootstrap-lto is taken out from the
configure line. 

Plain 'make' works both with and without bootstrap-lto.


[Bug libffi/64572] r219477 breaks bootstrap on x86_64 darwin

2015-01-14 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64572

--- Comment #19 from Richard Henderson  ---
(In reply to Dominique d'Humieres from comment #18)
> Those are files specific to darwin, but I don't think they are the only one
> used to build libffi.

99%.

Anyway, it doesn't matter.  One of you folk that actually
have darwin are going to have to debug this.

--- Comment #20 from howarth at bromo dot med.uc.edu ---
So currently what we have in libffi is a merge from upstream for everyone but
darwin which has selective files back ported from the prior release. So this
build is untested upstream.


[Bug target/53987] [SH] Unnecessary zero-extensions

2015-01-14 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53987

--- Comment #9 from Oleg Endo  ---
Another related issue is this example function:

unsigned char h (unsigned char a, int b)
{
  return (unsigned char)(a + b);
}

compiling with -O2 -mrenesas (which allows undefined high bits in the return
value):
extu.b  r4,r4<< not needed
mov r5,r0
rts
add r4,r0

It seems that the fwprop1 pass causes this.
The initial RTL for this looks like this:

(insn 2 5 3 2 (set (reg/v:SI 165 [ a ])
(zero_extend:SI (reg:QI 4 r4 [ a ]))) sh_tmp.cpp:1550 -1
 (nil))
(insn 3 2 4 2 (set (reg/v:SI 166 [ b ])
(reg:SI 5 r5 [ b ])) sh_tmp.cpp:1550 -1
 (nil))
(note 4 3 7 2 NOTE_INSN_FUNCTION_BEG)
(insn 7 4 8 2 (set (reg:QI 168)
(subreg:QI (reg/v:SI 166 [ b ]) 0)) sh_tmp.cpp:1551 -1
 (nil))
(insn 8 7 9 2 (set (reg:SI 169)
(plus:SI (reg/v:SI 165 [ a ])
(subreg:SI (reg:QI 168) 0))) sh_tmp.cpp:1551 -1
 (nil))
(insn 9 8 13 2 (set (reg:QI 164 [  ])
(subreg:QI (reg:SI 169) 0)) sh_tmp.cpp:1551 -1
 (nil))
(insn 13 9 14 2 (set (reg/i:QI 0 r0)
(reg:QI 164 [  ])) sh_tmp.cpp:1552 -1
 (nil))
(insn 14 13 0 2 (use (reg/i:QI 0 r0)) sh_tmp.cpp:1552 -1
 (nil))


Notice that the plus op is expanded as a subreg:SI (reg:QI) and the result is
then taken as a subreg:QI.  This should be OK with the addsi3 pattern. 
However, fwprop1 then propagates the hardregs and eliminates the subregs:

(note 5 0 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(insn 2 5 3 2 (set (reg/v:SI 165 [ a ])
(zero_extend:SI (reg:QI 4 r4 [ a ]))) sh_tmp.cpp:1550 218
{*zero_extendqisi2_compact}
 (expr_list:REG_DEAD (reg:QI 4 r4 [ a ])
(nil)))
(insn 3 2 4 2 (set (reg/v:SI 166 [ b ])
(reg:SI 5 r5 [ b ])) sh_tmp.cpp:1550 252 {movsi_ie}
 (expr_list:REG_DEAD (reg:SI 5 r5 [ b ])
(nil)))
(note 4 3 8 2 NOTE_INSN_FUNCTION_BEG)
(insn 8 4 13 2 (set (reg:SI 169)
(plus:SI (reg/v:SI 165 [ a ])
(reg/v:SI 166 [ b ]))) sh_tmp.cpp:1551 63 {*addsi3_compact}
 (expr_list:REG_DEAD (reg:QI 168 [ b ])
(expr_list:REG_DEAD (reg/v:SI 165 [ a ])
(nil
(insn 13 8 14 2 (set (reg/i:QI 0 r0)
(subreg:QI (reg:SI 169) 0)) sh_tmp.cpp:1552 270 {*movqi}
 (expr_list:REG_DEAD (reg:SI 169)
(nil)))
(insn 14 13 0 2 (use (reg/i:QI 0 r0)) sh_tmp.cpp:1552 -1
 (nil))

After that, everything is pretty much set and the zero extension will not be
eliminated anymore.


[Bug c++/63522] [4.8/4.9/5 Regression] ICE: unexpected expression 'ElementIndices' of kind template_parm_index

2015-01-14 Thread tbsaunde at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63522

tbsaunde at gcc dot gnu.org changed:

   What|Removed |Added

 CC||tbsaunde at gcc dot gnu.org

--- Comment #3 from tbsaunde at gcc dot gnu.org ---
fixed?


[Bug middle-end/44982] [4.8/4.9/5 Regression] ICE in get_narrower, at tree.c:7832

2015-01-14 Thread tbsaunde at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44982

tbsaunde at gcc dot gnu.org changed:

   What|Removed |Added

 CC||tbsaunde at gcc dot gnu.org

--- Comment #10 from tbsaunde at gcc dot gnu.org ---
(In reply to Richard Biener from comment #1)
> Confirmed.

hm, wfm, but it looks like the patch in comment 3 wasn't applied.  Is there
something to do here?


[Bug c++/64608] Raw string delimiter fails to allow @ or $

2015-01-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64608

--- Comment #1 from Jonathan Wakely  ---
But @ and $ aren't part of the basic source character set. See 2.3
[lex.charset].


[Bug libffi/64572] r219477 breaks bootstrap on x86_64 darwin

2015-01-14 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64572

--- Comment #18 from Dominique d'Humieres  ---
> > What about the other files used by darwin?
>
> darwin.S is also unchanged.

Those are files specific to darwin, but I don't think they are the only one
used to build libffi.


[Bug libffi/64572] r219477 breaks bootstrap on x86_64 darwin

2015-01-14 Thread rth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64572

--- Comment #17 from Richard Henderson  ---
(In reply to Dominique d'Humieres from comment #15)
> What about the other files used by darwin?

darwin.S is also unchanged.


[Bug c++/64608] New: Raw string delimiter fails to allow @ or $

2015-01-14 Thread westondan at ca dot rr.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64608

Bug ID: 64608
   Summary: Raw string delimiter fails to allow @ or $
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: westondan at ca dot rr.com

gcc --std=c++11 -E fails to allow use of @ or $ in a raw string tag, even
though these conform to the standard (section 2.14.5), namely:
d-char-sequence:
  d-char
  d-char-sequence d-char
d-char:
  any member of the basic source character set except:
space, the left parenthesis (, the right parenthesis ), the backslash \,
and the control characters representing horizontal tab,
vertical tab, form feed, and newline.


> cat go.cc
int main() {
  const char x[] = R"tag(good)tag";
#if 0
  const char y[] = R"t@g(bad)t@g";
  const char z[] = R"t$g(bad)t$g";
#endif
  return x[0];
}

> gcc -v -save-temps -E --std=c++11 go.cc
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1'
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-E' '-std=c++11' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus -E -quiet -v -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE go.cc -mtune=generic -march=x86-64 -std=c++11
-fpch-preprocess -fstack-protector -Wformat -Wformat-security
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/4.8"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.8
 /usr/include/x86_64-linux-gnu/c++/4.8
 /usr/include/c++/4.8/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
# 1 "go.cc"
# 1 ""
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "" 2
# 1 "go.cc"
int main() {
go.cc:4:23: error: invalid character '@' in raw string delimiter
   const char y[] = R"t@g(bad)t@g";
^
go.cc:5:23: error: invalid character '$' in raw string delimiter
   const char z[] = R"t$g(bad)t$g";
^
  const char x[] = R"tag(good)tag";




  return x[0];
}


[Bug libffi/64572] r219477 breaks bootstrap on x86_64 darwin

2015-01-14 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64572

--- Comment #16 from H.J. Lu  ---
This may be a dup of PR 64607 or PR 64581.


[Bug ipa/64314] [5 Regression] ICE in record_reference, at cgraphbuild.c:87

2015-01-14 Thread larsbj at gullik dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64314

--- Comment #2 from Lars Gullik Bjønnes  ---
I still see this, but with current gcc5 the call stack has become a bit
deeper, instead of 5 calls to walk_tree_1 I now see 9 calls.
(with -std=gnu++14 in this case.)

[Bug libffi/64607] [5 Regression] Multilib test stops working in libffi

2015-01-14 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64607

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-01-14
 Ever confirmed|0   |1


[Bug ipa/64218] [5 Regression] ICE: Segmentation fault (symtab_node::get_alias_target()) running Boost testsuite

2015-01-14 Thread larsbj at gullik dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64218

Lars Gullik Bjønnes  changed:

   What|Removed |Added

 CC||larsbj at gullik dot net

--- Comment #9 from Lars Gullik Bjønnes  ---
I see the same segfault also outside of the boost testsuite,
have not been able to produce a test case that is uploadable.
(without significant reduction I am not allowed to post the code.)

[Bug libffi/64581] [5 Regression] libffi/testsuite/libffi.special/special.exp doesn't use newly built GCC

2015-01-14 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64581

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-01-14
 CC||rth at gcc dot gnu.org
   Target Milestone|--- |5.0
Summary|libffi/testsuite/libffi.spe |[5 Regression]
   |cial/special.exp doesn't|libffi/testsuite/libffi.spe
   |use newly built GCC |cial/special.exp doesn't
   ||use newly built GCC
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu  ---
r219477 wiped out all GCC customization.  We need to investigate them
and put them back if needed.


[Bug target/53988] [SH] tst Rm,Rn not used for QI/HImode

2015-01-14 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53988

--- Comment #5 from Oleg Endo  ---
Author: olegendo
Date: Wed Jan 14 23:46:34 2015
New Revision: 219623

URL: https://gcc.gnu.org/viewcvs?rev=219623&root=gcc&view=rev
Log:
gcc/
PR target/53988
* config/sh/sh-protos.h (sh_find_set_of_reg): Add option to ignore
reg-reg copies.
(sh_extending_set_of_reg): New struct.
(sh_find_extending_set_of_reg, sh_split_tst_subregs,
sh_remove_reg_dead_or_unused_notes): New Declarations.
* config/sh/sh.c (sh_remove_reg_dead_or_unused_notes,
sh_find_extending_set_of_reg, sh_split_tst_subregs,
sh_extending_set_of_reg::use_as_extended_reg): New functions.
* config/sh/sh.md (*tst_t_zero): Rename to *tst_t_subregs,
convert to insn_and_split and use new function sh_split_tst_subregs.

gcc/testsuite/
PR target/53988
* gcc.target/sh/pr53988-1.c: New.

Added:
trunk/gcc/testsuite/gcc.target/sh/pr53988-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/sh-protos.h
trunk/gcc/config/sh/sh.c
trunk/gcc/config/sh/sh.md
trunk/gcc/testsuite/ChangeLog


[Bug rtl-optimization/64300] [5 Regression] s390x, ICE, unable to generate reloads, in curr_insn_transform, at lra-constraints.c

2015-01-14 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64300

--- Comment #4 from Kazumoto Kojima  ---
I think this has been addressed with r218760 by Makarov.  Can we
close this as resolved?


[Bug libffi/64572] r219477 breaks bootstrap on x86_64 darwin

2015-01-14 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64572

--- Comment #15 from Dominique d'Humieres  ---
> Running target unix-m64
> ERROR: couldn't load description file for unix-m64

I think it is pr64607.

> Well, then you'll have to figure out what else could have changed
> between r219474 and r219477, because the answer should have been
> nothing at all.
>
> The current darwin_c.c is an exact copy of the previous ffi.c.

What about the other files used by darwin?


[Bug libffi/64607] New: [5 Regression] Multilib test stops working in libffi

2015-01-14 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64607

Bug ID: 64607
   Summary: [5 Regression] Multilib test stops working in libffi
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libffi
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com

After merging with libffi upstream, multilib test stops working in libffi.

https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg01438.html

shows

=== libffi tests ===


Running target unix

=== libffi Summary ===

# of expected passes2204

instead of

https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg00030.html

=== libffi tests ===


Running target unix/-m32

=== libffi Summary for unix/-m32 ===

# of expected passes24

Running target unix

=== libffi Summary for unix ===

# of expected passes24

=== libffi Summary ===

# of expected passes3638
# of unsupported tests110

It is due to

commit f8cdf11467181f2a9a6b7e748167569aa58e3a81
Author: Ryan VanderMeulen 
Date:   Mon Mar 10 15:04:58 2014 -0400

Replace double quotes with single quotes in Makefile.in to improve
compatibility between some versions of MSYS and gmake. From Mozilla bug 943728.
https://bugzilla.mozilla.org/show_bug.cgi?id=943728

:100644 100644 03bfdff9f9d9477cab36c6f41583a2988335137d
e930f53fde6e827c649d2a1cdeb4e39fd20f4286 MChangeLog
:100644 100644 08f66206d39f42818284fbe503939f6f0ec0bb20
70d9bb7447ed4821fed14bf4419474ad390dd537 MMakefile.in


commit 46c5d3c30fdc2b43c076ad955078d7c5f1e75b37
Author: Ryan VanderMeulen 
Date:   Sun Mar 16 21:16:08 2014 -0400

Change double quotes in Makefile.am to single quotes.

This was originally done in PR #84, except the change was made to
Makefile.in instead of Makefile.am and was therefore reverted the next time the
files were regenerated.

:100644 100644 557d5269301b136ade693997102fccb66b8e9e43
e2011e7e31e9fccb0db935dcf1b2c4991c7f1207 MMakefile.am

It doesn't work with

make check -k RUNTESTFLAGS="--target_board='unix{-m32,}'"


[Bug libffi/64607] [5 Regression] Multilib test stops working in libffi

2015-01-14 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64607

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug target/64606] New: multiple warnings in arm target code

2015-01-14 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64606

Bug ID: 64606
   Summary: multiple warnings in arm target code
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: joel at gcc dot gnu.org

/users/joel/test-gcc/b-arm-rtems4.11-gcc/./gcc/xgcc
-B/users/joel/test-gcc/b-arm-rtems4.11-gcc/./gcc/ -nostdinc
-B/users/joel/test-gcc/b-arm-rtems4.11-gcc/arm-rtems4.11/newlib/ -isystem
/users/joel/test-gcc/b-arm-rtems4.11-gcc/arm-rtems4.11/newlib/targ-include
-isystem /users/joel/test-gcc/gcc/newlib/libc/include
-B/users/joel/test-gcc/install-head/arm-rtems4.11/bin/
-B/users/joel/test-gcc/install-head/arm-rtems4.11/lib/ -isystem
/users/joel/test-gcc/install-head/arm-rtems4.11/include -isystem
/users/joel/test-gcc/install-head/arm-rtems4.11/sys-include-g -O2 -mthumb
-O2 -I../../../../gcc/libgcc/../newlib/libc/sys/rtems/include -g -O2 -DIN_GCC 
-DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
-isystem ./include   -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector -Dinhibit_libc  -fno-inline -I. -I. -I../../.././gcc
-I../../../../gcc/libgcc -I../../../../gcc/libgcc/.
-I../../../../gcc/libgcc/../gcc -I../../../../gcc/libgcc/../include 
-DHAVE_CC_TLS  -o _fractunsUDAUDI.o -MT _fractunsUDAUDI.o -MD -MP -MF
_fractunsUDAUDI.dep -DL_fractuns -DFROM_UDA -DTO_UDI -c
../../../../gcc/libgcc/fixed-bit.c -fvisibility=hidden -DHIDE_EXPORTS
mv -f libunwind.visT libunwind.vis
../../../gcc/libgcc/config/arm/fp16.c:97:1: warning: no previous prototype for
'__gnu_h2f_internal' [-Wmissing-prototypes]
 __gnu_h2f_internal(unsigned short a, int ieee)
 ^
../../../gcc/libgcc/config/arm/fp16.c:122:1: warning: no previous prototype for
'__gnu_f2h_ieee' [-Wmissing-prototypes]
 __gnu_f2h_ieee(unsigned int a)
 ^
../../../gcc/libgcc/config/arm/fp16.c:128:1: warning: no previous prototype for
'__gnu_h2f_ieee' [-Wmissing-prototypes]
 __gnu_h2f_ieee(unsigned short a)
 ^
../../../gcc/libgcc/config/arm/fp16.c:134:1: warning: no previous prototype for
'__gnu_f2h_alternative' [-Wmissing-prototypes]
 __gnu_f2h_alternative(unsigned int x)
 ^
../../../gcc/libgcc/config/arm/fp16.c:140:1: warning: no previous prototype for
'__gnu_h2f_alternative' [-Wmissing-prototypes]
 __gnu_h2f_alternative(unsigned short a)
 ^
In file included from ../../../gcc/libgcc/config/arm/unwind-arm.c:143:0:
../../../gcc/libgcc/unwind-arm-common.inc: In function 'get_eit_entry':
../../../gcc/libgcc/unwind-arm-common.inc:245:29: warning: cast discards
'const' qualifier from pointer target type [-Wcast-qual]
   ucbp->pr_cache.ehtp = (_Unwind_EHT_Header *)&eitp->content;


[Bug c++/58671] [c++11] ICE with thread_local and self-referential variable initialization

2015-01-14 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58671

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.0

--- Comment #3 from Paolo Carlini  ---
Fixed for 5.0.


[Bug c++/59994] [meta-bug] thread_local

2015-01-14 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59994
Bug 59994 depends on bug 58671, which changed state.

Bug 58671 Summary: [c++11] ICE with thread_local and self-referential variable 
initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58671

   What|Removed |Added

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


[Bug c++/58671] [c++11] ICE with thread_local and self-referential variable initialization

2015-01-14 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58671

--- Comment #2 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Wed Jan 14 22:28:07 2015
New Revision: 219621

URL: https://gcc.gnu.org/viewcvs?rev=219621&root=gcc&view=rev
Log:
/cp
2015-01-14  Paolo Carlini  

PR c++/58671
* decl2.c (var_defined_without_dynamic_init): Handle gracefully
self-initialization.

/testsuite
2015-01-14  Paolo Carlini  

PR c++/58671
* g++.dg/tls/thread_local-ice3.C: New.

Added:
trunk/gcc/testsuite/g++.dg/tls/thread_local-ice3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
trunk/gcc/testsuite/ChangeLog


[Bug testsuite/64605] New: [5 Regression] ERROR: (DejaGnu) proc "libatomic_target_compile lto1738.c lto1738.o object additional_flags=-flto" does not exist.

2015-01-14 Thread iverbin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64605

Bug ID: 64605
   Summary: [5 Regression] ERROR: (DejaGnu) proc
"libatomic_target_compile lto1738.c lto1738.o object
additional_flags=-flto" does not exist.
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: iverbin at gcc dot gnu.org

A fix for check_effective_target_lto (r219606) caused an ERROR in libatomic
testsuite.

To reproduce: make check-target-libatomic

ERROR: (DejaGnu) proc "libatomic_target_compile lto4486.c lto4486.o object
additional_flags=-flto" does not exist.
The error code is NONE
The info on the error is:
invalid command name "libatomic_target_compile"
while executing
"::tcl_unknown libatomic_target_compile lto4486.c lto4486.o object
additional_flags=-flto"
("uplevel" body line 1)
invoked from within
"uplevel 1 ::tcl_unknown $args"


[Bug target/64513] [4.8/4.9 Regression] ICE: in maybe_record_trace_start, at dwarf2cfi.c:2231 with -mstack-arg-probe

2015-01-14 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64513

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Wed Jan 14 22:04:49 2015
New Revision: 219618

URL: https://gcc.gnu.org/viewcvs?rev=219618&root=gcc&view=rev
Log:
Backported from mainline
2015-01-12  Jakub Jelinek  

PR target/64513
* config/i386/i386.c (ix86_expand_prologue): Add
REG_FRAME_RELATED_EXPR to %rax and %r10 pushes.

* gcc.target/i386/pr64513.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/pr64513.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/i386/i386.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug c++/64603] [5 Regression] bogus error "no matching function for call to ..." with templates

2015-01-14 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64603

Ville Voutilainen  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-01-14
 CC||ville.voutilainen at gmail dot 
com
  Known to work||4.7.3, 4.8.2, 4.9.1
 Ever confirmed|0   |1
  Known to fail||5.0

--- Comment #1 from Ville Voutilainen  ---
Clang also accepts the code.


[Bug target/17836] [4.0 Regression] ABI breakage for 16-byte vectors (non-Altivec ABI & ISA)

2015-01-14 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17836

--- Comment #7 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Wed Jan 14 21:51:09 2015
New Revision: 219616

URL: https://gcc.gnu.org/viewcvs?rev=219616&root=gcc&view=rev
Log:
Correct target selector in -mfentry tests

-fprofile -mfentry works with PIE if gcrt1.o is compiled with -fPIC.  A
glibc has been filed, PR 17836, and a glibc patch has been submitted.

* gcc.target/i386/fentry-override.c: Properly place {} in target
selector.  Remove nonpic.
* gcc.target/i386/fentry.c: Likewise.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/fentry-override.c
trunk/gcc/testsuite/gcc.target/i386/fentry.c


[Bug preprocessor/64604] New: [5 Regression] r212194 causes zsh miscompilation

2015-01-14 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64604

Bug ID: 64604
   Summary: [5 Regression] r212194 causes zsh miscompilation
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
CC: dodji at gcc dot gnu.org

Starting with r212194 zsh gets miscompiled on my machine (x86_64).
Symptoms include startup crashes and bizarre tab expansion failures like:

markus@x4 ~ % /va
_main_complete:trap:131: undefined signal: INT

I haven't looked deeper yet. Will hopefully be able to do so tomorrow.


[Bug c++/64520] [4.8/4.9/5 Regression] ICE with std::initializer_list

2015-01-14 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64520

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|4.8.5   |5.0

--- Comment #3 from Jason Merrill  ---
Fixed for GCC 5.


[Bug c++/55004] [meta-bug] constexpr issues

2015-01-14 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
Bug 55004 depends on bug 58777, which changed state.

Bug 58777 Summary: Taking address of variant/union member is not always a 
constant expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58777

   What|Removed |Added

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


[Bug c++/58777] Taking address of variant/union member is not always a constant expression

2015-01-14 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58777

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Target Milestone|--- |5.0

--- Comment #4 from Jason Merrill  ---
Fixed for GCC 5.


[Bug c++/64356] Some constexpr expressions not recognized as constexpr

2015-01-14 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64356

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.0

--- Comment #2 from Jason Merrill  ---
Fixed.


[Bug c++/64603] New: [5 Regression] bogus error "no matching function for call to ..." with templates

2015-01-14 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64603

Bug ID: 64603
   Summary: [5 Regression] bogus error "no matching function for
call to ..." with templates
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: janus at gcc dot gnu.org

Created attachment 34452
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34452&action=edit
source file

The attached source file compiles fine with g++ 4.9.1, 4.8.3 and 4.7.4.

However, it is rejected with current trunk builds:

$ g++-5.0 logging.cc -std=c++11
logging.cc: In function ‘void create_all_loggers()’:
logging.cc:33:62: error: no matching function for call to
‘create_all_loggers_impl()’
   create_all_loggers_impl::value>();
  ^
logging.cc:26:52: note: candidate: template > typename std::enable_if<(index == 0)>::type
create_all_loggers_impl()
 inline typename std::enable_if<(index == 0)>::type create_all_loggers_impl()
{}
^
logging.cc:26:52: note:   template argument deduction/substitution failed:
logging.cc: In substitution of ‘template > typename std::enable_if<(index == 0)>::type
create_all_loggers_impl() [with long unsigned int index = 1ul; int 
= ]’:
logging.cc:33:62:   required from here
logging.cc:26:52: error: no type named ‘type’ in ‘struct std::enable_if’
logging.cc:30:52: note: candidate: template typename std::enable_if<(index != 0)>::type
create_all_loggers_impl()
 inline typename std::enable_if<(index != 0)>::type create_all_loggers_impl()
{}
^
logging.cc:30:52: note:   template argument deduction/substitution failed:
logging.cc:29:61:   in constexpr expansion of ‘find_longest_logger_name<1ul>()’
logging.cc:29:62: error: ‘(((int)(((unsigned int)5ul) + 4294967295u)) > 0)’ is
not a constant expression
   int longest_name = find_longest_logger_name()>
  ^
logging.cc:29:62: note: in template argument for type ‘int’

[Bug debug/64602] h8300 ICE building libssp/ssp.c ICE, in maybe_record_trace_start, at dwarf2cfi.c:2308

2015-01-14 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64602

--- Comment #1 from Joel Sherrill  ---
Created attachment 34451
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34451&action=edit
Preprocessed source of libssp/ssp.c that trips error


[Bug debug/64602] New: h8300 ICE building libssp/ssp.c ICE, in maybe_record_trace_start, at dwarf2cfi.c:2308

2015-01-14 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64602

Bug ID: 64602
   Summary: h8300 ICE building libssp/ssp.c ICE, in
maybe_record_trace_start, at dwarf2cfi.c:2308
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: joel at gcc dot gnu.org

git head d4cbe45aae70e38c12f3cd7430427c98289d7882


/users/joel/test-gcc/b-h8300-elf-gcc/./gcc/xgcc
-B/users/joel/test-gcc/b-h8300-elf-gcc/./gcc/ -nostdinc
-B/users/joel/test-gcc/b-h8300-elf-gcc/h8300-elf/h8sx/normal/newlib/ -isystem
/users/joel/test-gcc/b-h8300-elf-gcc/h8300-elf/h8sx/normal/newlib/targ-include
-isystem /users/joel/test-gcc/gcc/newlib/libc/include
-B/users/joel/test-gcc/install-head/h8300-elf/bin/
-B/users/joel/test-gcc/install-head/h8300-elf/lib/ -isystem
/users/joel/test-gcc/install-head/h8300-elf/include -isystem
/users/joel/test-gcc/install-head/h8300-elf/sys-include -msx -mn
-DHAVE_CONFIG_H -I. -I../../../../../gcc/libssp -Wall -g -O2 -msx -mn -MT
ssp.lo -MD -MP -MF .deps/ssp.Tpo -c ../../../../../gcc/libssp/ssp.c -o ssp.o
../../../../../gcc/libssp/ssp.c: In function 'fail.isra___0':
../../../../../gcc/libssp/ssp.c:163:1: internal compiler error: in
maybe_record_trace_start, at dwarf2cfi.c:2308
 }
 ^
0x5ddbb7 maybe_record_trace_start
../../gcc/gcc/dwarf2cfi.c:2308
0x5dde63 create_trace_edges
../../gcc/gcc/dwarf2cfi.c:2400
0x5de11f scan_trace
../../gcc/gcc/dwarf2cfi.c:2614
0x5dec6a create_cfi_notes
../../gcc/gcc/dwarf2cfi.c:2640
0x5dec6a execute_dwarf2_frame
../../gcc/gcc/dwarf2cfi.c:2996
0x5dec6a execute
../../gcc/gcc/dwarf2cfi.c:3476
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


[Bug ipa/64586] internal compiler error in ipa-inline.c:1664

2015-01-14 Thread acsawdey at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64586

--- Comment #5 from Aaron Sawdey  ---
This is also fixed by 219556.


[Bug fortran/64578] [OOP] Seg-fault and ICE with unlimited polymorphic array pointer function

2015-01-14 Thread paul.richard.thomas at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64578

paul.richard.thomas at gmail dot com  
changed:

   What|Removed |Added

 CC||paul.richard.thomas at gmail 
dot c
   ||om

--- Comment #8 from paul.richard.thomas at gmail dot com  ---
(In reply to janus from comment #6)
> Reduced test case for the ICE:
> 
>   print *, associated(return_pointer()) ! ICE
> contains
>   function return_pointer()
> class(*), pointer :: return_pointer(:)
>   end function 
> end
> 
> ICEs with 4.8, 4.9, trunk. Rejected by 4.7, because class(*) is not
> supported.

The above ICE is fixed with:

Index: /svn/trunk/gcc/fortran/trans-intrinsic.c
===
*** /svn/trunk/gcc/fortran/trans-intrinsic.c(revision 219297)
--- /svn/trunk/gcc/fortran/trans-intrinsic.c(working copy)
*** gfc_conv_associated (gfc_se *se, gfc_exp
*** 6544,6550 
--- 6544,6554 
  arg1se.expr = build_fold_indirect_ref_loc (input_location,
 arg1se.expr);
if (arg1->expr->ts.type == BT_CLASS)
+ {
tmp2 = gfc_class_data_get (arg1se.expr);
+   if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (tmp2)))
+ tmp2 = gfc_conv_descriptor_data_get (tmp2);
+ }
else
  tmp2 = arg1se.expr;
  }

such that

  type foo
integer :: i
  end type
  logical :: l
  class(foo), pointer :: ptr(:)
  print *, associated(return_pointer())   ! ICE
  print *, associated(return_pointer1())   ! ICE
  ptr => return_pointer1 ()
  select type (ptr)
type is (foo)
  print *, ptr%i
  end select
contains
  function return_pointer()
class(foo), pointer :: return_pointer(:)
return_pointer => NULL()
  end function
  function return_pointer1()
class(foo), pointer :: return_pointer1(:)
allocate (return_pointer1(2), source = foo(99))
  end function
end

does the right thing

[pault@localhost pr55901]# ./a.out
 F
 T
  99  99

The runtime segfault remains because the code for the call to return_pointer in
the full example is
{
  struct __class__STAR_1_0p ptrtemp.12;
  struct __class_MAIN___Foo_t class.11;

  ptrtemp.12 = return_pointer (&class.11);
  (struct __vtype__STAR *) ptr._vptr = (struct __vtype__STAR *)
ptrtemp.12._vptr;
  ptr._data = ptrtemp.12._data;
}

ie. bizarrely, none of the fields in class.11 are set. I'll see if I can
understand why.

Cheers

Paul


[Bug rtl-optimization/64286] [4.9 Regression] Redundant extend removal ignores vector element type

2015-01-14 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64286

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Wed Jan 14 20:24:05 2015
New Revision: 219614

URL: https://gcc.gnu.org/viewcvs?rev=219614&root=gcc&view=rev
Log:
Backported from mainline
2015-01-13  Jakub Jelinek  

PR rtl-optimization/64286
* ree.c (combine_reaching_defs): Move part of comment earlier,
remove !SCALAR_INT_MODE_P check.
(add_removable_extension): Don't add vector mode
extensions if all uses of the source register aren't the same
vector extensions.

* gcc.target/i386/avx2-pr64286.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/avx2-pr64286.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/ree.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug fortran/64528] [5 Regression] ICE: in process_constraint, at tree-ssa-structalias.c:3002 with -O -fno-tree-ccp -fno-tree-dce

2015-01-14 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64528

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Wed Jan 14 20:22:47 2015
New Revision: 219613

URL: https://gcc.gnu.org/viewcvs?rev=219613&root=gcc&view=rev
Log:
Backported from mainline
2015-01-13  Jakub Jelinek  

PR fortran/64528
* trans-decl.c (create_function_arglist): Don't set TREE_READONLY
on dummy args with VALUE attribute.

* gfortran.dg/pr64528.f90: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/pr64528.f90
Modified:
branches/gcc-4_9-branch/gcc/fortran/ChangeLog
branches/gcc-4_9-branch/gcc/fortran/trans-decl.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug tree-optimization/64563] [5 Regression] ICE with "-Wall -Wextra" at -Os and above on x86_64-linux-gnu

2015-01-14 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64563

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Wed Jan 14 20:21:49 2015
New Revision: 219612

URL: https://gcc.gnu.org/viewcvs?rev=219612&root=gcc&view=rev
Log:
Backported from mainline
2015-01-12  Jakub Jelinek  

PR tree-optimization/64563
* tree-vrp.c (vrp_evaluate_conditional): Check for VR_RANGE
instead of != VR_VARYING.

* gcc.dg/pr64563.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr64563.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/tree-vrp.c


[Bug target/64600] arm-rtems ICE on valid code (-mcpu=xscale)

2015-01-14 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64600

--- Comment #3 from Joel Sherrill  ---
(In reply to Joel Sherrill from comment #1)
> Created attachment 34450 [details]
> Preprocessed RTEMS source which produces the error

Attached test case compiles at -Os but not -O1 or -O2. 
-O2 without -mcpu=xscale also works.

Compiles find with end of 4.9 branch

arm-rtems4.11-gcc (GCC) 4.9.3 20150104 (prerelease)


[Bug tree-optimization/64601] New: Missed PRE on std::vector move assignment

2015-01-14 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64601

Bug ID: 64601
   Summary: Missed PRE on std::vector move assignment
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: glisse at gcc dot gnu.org

Comparing these 2 ways (not necessarily 100% equivalent) to move a std::vector,
we generate significantly better code for f than for g, which is not really
what users expect.

#include 
#include 

typedef std::vector V;
void f(V&v,V&w){
  V(std::move(w)).swap(v);
}
void g(V&v,V&w){
  v=std::move(w);
}


For f (good code):

  :
  _3 = MEM[(int * &)w_2(D)];
  MEM[(int * &)w_2(D)] = 0B;
  _6 = MEM[(int * &)w_2(D) + 8];
  MEM[(int * &)w_2(D) + 8] = 0B;
  _7 = MEM[(int * &)w_2(D) + 16];
  MEM[(int * &)w_2(D) + 16] = 0B;
  _8 = MEM[(int * &)v_4(D)];
  MEM[(int * &)v_4(D)] = _3;
  MEM[(int * &)v_4(D) + 8] = _6;
  MEM[(int * &)v_4(D) + 16] = _7;
  if (_8 != 0B)
goto ;
  else
goto ;

  :
  operator delete (_8); [tail call]

  :
  return;


While for g (not as good):

  :
  __tmp.0_5 = MEM[(int * &)v_4(D)];
  MEM[(int * &)v_4(D)] = 0B;
  MEM[(int * &)v_4(D) + 8] = 0B;
  MEM[(int * &)v_4(D) + 16] = 0B;
  _6 = MEM[(int * &)w_2(D)];
  MEM[(int * &)v_4(D)] = _6;
  MEM[(int * &)w_2(D)] = 0B;
  __tmp.0_7 = MEM[(int * &)v_4(D) + 8];
  _8 = MEM[(int * &)w_2(D) + 8];
  MEM[(int * &)v_4(D) + 8] = _8;
  MEM[(int * &)w_2(D) + 8] = __tmp.0_7;
  __tmp.0_9 = MEM[(int * &)v_4(D) + 16];
  _10 = MEM[(int * &)w_2(D) + 16];
  MEM[(int * &)v_4(D) + 16] = _10;
  MEM[(int * &)w_2(D) + 16] = __tmp.0_9;
  if (__tmp.0_5 != 0B)
  [...]

The first really surprising line is the definition of __tmp.0_7 (always 0). Gcc
should know that the stores to v+0 and v+16 don't alias v+8 (same base, known
size+offset), and it should also know that w+0 and v+8 don't alias (same base
type, different fields). I am wondering if the issue could be related to having
directly an int* MEM_REF (it appears during early inline) instead of several
COMPONENT_REF (which would show as ._M_impl._M_start in the dump).

(alternatively, gcc could notice that the potential clobbering value is the
same as the old value, but that's a separate, known issue)


[Bug libffi/64572] r219477 breaks bootstrap on x86_64 darwin

2015-01-14 Thread rth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64572

Richard Henderson  changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #14 from Richard Henderson  ---
Well, then you'll have to figure out what else could have changed
between r219474 and r219477, because the answer should have been
nothing at all.

The current darwin_c.c is an exact copy of the previous ffi.c.


[Bug target/64599] arm-rtems ICE on valid code (-mcpu=xscale)

2015-01-14 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64599

Joel Sherrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Joel Sherrill  ---
Weird. Bugzilla hiccuped and two identical PRs ended up submitted. Closing this
one.

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


[Bug target/64600] arm-rtems ICE on valid code (-mcpu=xscale)

2015-01-14 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64600

--- Comment #2 from Joel Sherrill  ---
*** Bug 64599 has been marked as a duplicate of this bug. ***


[Bug target/64600] arm-rtems ICE on valid code (-mcpu=xscale)

2015-01-14 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64600

--- Comment #1 from Joel Sherrill  ---
Created attachment 34450
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34450&action=edit
Preprocessed RTEMS source which produces the error


[Bug target/64600] New: arm-rtems ICE on valid code (-mcpu=xscale)

2015-01-14 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64600

Bug ID: 64600
   Summary: arm-rtems ICE on valid code (-mcpu=xscale)
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: joel at gcc dot gnu.org

$ arm-rtems4.11-gcc --version
arm-rtems4.11-gcc (GCC) 5.0.0 20150114 (experimental)

Last hash per git: commit d4cbe45aae70e38c12f3cd7430427c98289d7882

The fix for 64460 is in place.

Attached test case compiles at -Os but not -O1 or -O2. 
-O2 without -mcpu=xscale also works.

arm-rtems4.11-gcc --pipe -DHAVE_CONFIG_H   -I..
-I../../cpukit/../../../gumstix/lib/include   -mcpu=xscale -O2 -g -Wall
-Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes
-Wnested-externs -MT src/libcsupport_a-cfgetospeed.o -MD -MP -MF
src/.deps/libcsupport_a-cfgetospeed.Tpo -c -o src/libcsupport_a-cfgetospeed.o
`test -f 'src/cfgetospeed.c' || echo
'../../../../../../rtems/c/src/../../cpukit/libcsupport/'`src/cfgetospeed.c
../../../../../../rtems/c/src/../../cpukit/libcsupport/src/cfgetospeed.c: In
function 'cfgetospeed':
../../../../../../rtems/c/src/../../cpukit/libcsupport/src/cfgetospeed.c:37:1:
internal compiler error: in decompose, at rtl.h:2005
 }
 ^
0x41c918 wi::int_traits >::decompose(long*,
unsigned int, std::pair const&)
../../gcc/gcc/rtl.h:2005
0x91eae0 wi::int_traits >::decompose(long*,
unsigned int, std::pair const&)
../../gcc/gcc/rtl.h:2005
0x91eae0 wide_int_ref_storage::wide_int_ref_storage >(std::pair const&, unsigned int)
../../gcc/gcc/wide-int.h:957
0x91eae0 generic_wide_int
>::generic_wide_int >(std::pair const&, unsigned int)
../../gcc/gcc/wide-int.h:733
0x91eae0 wi::binary_traits,
std::pair, wi::int_traits >::precision_type, wi::int_traits >::precision_type>::result_type wi::sub, std::pair >(std::pair const&, std::pair const&)
../../gcc/gcc/wide-int.h:2357
0x91eae0 simplify_const_binary_operation(rtx_code, machine_mode, rtx_def*,
rtx_def*)
../../gcc/gcc/simplify-rtx.c:3867
0x91bf3f simplify_binary_operation(rtx_code, machine_mode, rtx_def*, rtx_def*)
../../gcc/gcc/simplify-rtx.c:1972
0x91fc77 simplify_associative_operation
../../gcc/gcc/simplify-rtx.c:1929
0x9188cc simplify_binary_operation_1
../../gcc/gcc/simplify-rtx.c:2967
0xdd4f21 combine_simplify_rtx
../../gcc/gcc/combine.c:5541
0xdd743b subst
../../gcc/gcc/combine.c:5374
0xdd70c8 subst
../../gcc/gcc/combine.c:5319
0xdd97ce try_combine
../../gcc/gcc/combine.c:3266
0xddef81 combine_instructions
../../gcc/gcc/combine.c:1312
0xddef81 rest_of_handle_combine
../../gcc/gcc/combine.c:14094
0xddef81 execute
../../gcc/gcc/combine.c:14137
Please submit a full bug report,
with preprocessed source if appropriate.


[Bug target/64599] New: arm-rtems ICE on valid code (-mcpu=xscale)

2015-01-14 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64599

Bug ID: 64599
   Summary: arm-rtems ICE on valid code (-mcpu=xscale)
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: joel at gcc dot gnu.org

Created attachment 34449
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34449&action=edit
Preprocessed RTEMS source which produces the error

$ arm-rtems4.11-gcc --version
arm-rtems4.11-gcc (GCC) 5.0.0 20150114 (experimental)

Last hash per git: commit d4cbe45aae70e38c12f3cd7430427c98289d7882

The fix for 64460 is in place.

Attached test case compiles at -Os but not -O1 or -O2. 
-O2 without -mcpu=xscale also works.

arm-rtems4.11-gcc --pipe -DHAVE_CONFIG_H   -I..
-I../../cpukit/../../../gumstix/lib/include   -mcpu=xscale -O2 -g -Wall
-Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes
-Wnested-externs -MT src/libcsupport_a-cfgetospeed.o -MD -MP -MF
src/.deps/libcsupport_a-cfgetospeed.Tpo -c -o src/libcsupport_a-cfgetospeed.o
`test -f 'src/cfgetospeed.c' || echo
'../../../../../../rtems/c/src/../../cpukit/libcsupport/'`src/cfgetospeed.c
../../../../../../rtems/c/src/../../cpukit/libcsupport/src/cfgetospeed.c: In
function 'cfgetospeed':
../../../../../../rtems/c/src/../../cpukit/libcsupport/src/cfgetospeed.c:37:1:
internal compiler error: in decompose, at rtl.h:2005
 }
 ^
0x41c918 wi::int_traits >::decompose(long*,
unsigned int, std::pair const&)
../../gcc/gcc/rtl.h:2005
0x91eae0 wi::int_traits >::decompose(long*,
unsigned int, std::pair const&)
../../gcc/gcc/rtl.h:2005
0x91eae0 wide_int_ref_storage::wide_int_ref_storage >(std::pair const&, unsigned int)
../../gcc/gcc/wide-int.h:957
0x91eae0 generic_wide_int
>::generic_wide_int >(std::pair const&, unsigned int)
../../gcc/gcc/wide-int.h:733
0x91eae0 wi::binary_traits,
std::pair, wi::int_traits >::precision_type, wi::int_traits >::precision_type>::result_type wi::sub, std::pair >(std::pair const&, std::pair const&)
../../gcc/gcc/wide-int.h:2357
0x91eae0 simplify_const_binary_operation(rtx_code, machine_mode, rtx_def*,
rtx_def*)
../../gcc/gcc/simplify-rtx.c:3867
0x91bf3f simplify_binary_operation(rtx_code, machine_mode, rtx_def*, rtx_def*)
../../gcc/gcc/simplify-rtx.c:1972
0x91fc77 simplify_associative_operation
../../gcc/gcc/simplify-rtx.c:1929
0x9188cc simplify_binary_operation_1
../../gcc/gcc/simplify-rtx.c:2967
0xdd4f21 combine_simplify_rtx
../../gcc/gcc/combine.c:5541
0xdd743b subst
../../gcc/gcc/combine.c:5374
0xdd70c8 subst
../../gcc/gcc/combine.c:5319
0xdd97ce try_combine
../../gcc/gcc/combine.c:3266
0xddef81 combine_instructions
../../gcc/gcc/combine.c:1312
0xddef81 rest_of_handle_combine
../../gcc/gcc/combine.c:14094
0xddef81 execute
../../gcc/gcc/combine.c:14137
Please submit a full bug report,
with preprocessed source if appropriate.


[Bug libffi/64572] r219477 breaks bootstrap on x86_64 darwin

2015-01-14 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64572

--- Comment #13 from howarth at bromo dot med.uc.edu ---
(In reply to Dominique d'Humieres from comment #8)
> 
>   === libffi Summary for unix/-m32 ===
> 
> # of expected passes  1870
> # of unexpected failures  20
> # of unsupported tests30
> 
> Running target unix/-m64
> 
>   === libffi Summary for unix/-m64 ===
> 
> # of expected passes  1904
> # of unsupported tests30
> 
>   === libffi Summary ===
> 
> # of expected passes  3774
> # of unexpected failures  20
> # of unsupported tests60
> 
> i.e., 20 failures with -m32.

These 32-bit failures appear to be darwin specific as a build of current gcc
trunk on x86_64 Fedora 15 and manually running there test suite in
build/x86_64-unknown-linux-gnu/32/libffi with 'make -k check
RUNTESTFLAGS="--target_board=unix'{-m32}'"' shows...

=== libffi Summary ===

# of expected passes2204

[Bug sanitizer/64350] TSAN fails after stress-testing for a while

2015-01-14 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64350

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug libgcc/64598] var-tracking.c has internal compiler error

2015-01-14 Thread hayder.alkhalissi at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64598

--- Comment #5 from hayder.alkhalissi at googlemail dot com ---
(In reply to Andrew Pinski from comment #3)
> What options are you using to configure GCC?  What target are you trying to
> compile for?  What version of GCC are you starting with?

Thanks for fast response.
In attached file, the target GCC with other compiler options.


[Bug libgcc/64598] var-tracking.c has internal compiler error

2015-01-14 Thread hayder.alkhalissi at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64598

--- Comment #4 from hayder.alkhalissi at googlemail dot com ---
Created attachment 34448
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34448&action=edit
configuration file for crosstoll-ng-1.20


[Bug libgcc/64598] var-tracking.c has internal compiler error

2015-01-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64598

--- Comment #3 from Andrew Pinski  ---
What options are you using to configure GCC?  What target are you trying to
compile for?  What version of GCC are you starting with?


[Bug libgcc/64598] var-tracking.c has internal compiler error

2015-01-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64598

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2015-01-14
 Ever confirmed|0   |1


[Bug libgcc/64598] var-tracking.c has internal compiler error

2015-01-14 Thread hayder.alkhalissi at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64598

--- Comment #2 from hayder.alkhalissi at googlemail dot com ---
Created attachment 34447
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34447&action=edit
Screen shot


[Bug libgcc/64598] var-tracking.c has internal compiler error

2015-01-14 Thread hayder.alkhalissi at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64598

--- Comment #1 from hayder.alkhalissi at googlemail dot com ---
Hi,

I am trying to create cross compiler by using gcc-4.9.1.
During the procdure, I got this error:

/crosstool-ng-1.20.0/.build/src/gcc-4.9.1/gcc/var-tracking.c:5824:1: internal
compiler error: Segmentation fault

Could you please help me ?

Thanks in advance


[Bug libgcc/64598] New: var-tracking.c has internal compiler error

2015-01-14 Thread hayder.alkhalissi at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64598

Bug ID: 64598
   Summary: var-tracking.c has internal compiler error
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgcc
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hayder.alkhalissi at googlemail dot com


[Bug sanitizer/64350] TSAN fails after stress-testing for a while

2015-01-14 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64350

Bernd Edlinger  changed:

   What|Removed |Added

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

--- Comment #3 from Bernd Edlinger  ---
fixed by r219545


[Bug middle-end/64592] [5 regression] tramp3d EH unwind tables are 50% bigger with mainline compared to GCC 4.9

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

--- Comment #3 from Jan Hubicka  ---
With help of Jakub we managed to figure out that on my setup it is because GCC
5.0 defaults to no .cfi directives, while GCC 4.9 uses them.
This seems to be because cfi working advance test, but we do not see ho this
test changed recently.

It may be helpful to update binutils on tester machines at opensuse.org


[Bug target/62066] config/arm/arm.c:25298: possible missing call to va_end ?

2015-01-14 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62066

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-01-14
 CC||ktkachov at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |ktkachov at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from ktkachov at gcc dot gnu.org ---
I'll fix it up when I get some time.


[Bug ipa/64545] failed gcc build: internal compiler error: in inline_small_functions, at ipa-inline.c:1693

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

--- Comment #8 from Jan Hubicka  ---
Curious it happens only with FDO... I am looking into that now.


[Bug middle-end/64592] [5 regression] tramp3d EH unwind tables are 50% bigger with mainline compared to GCC 4.9

2015-01-14 Thread hubicka at ucw dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64592

--- Comment #2 from Jan Hubicka  ---
> accumulate-outgoing-args default setting change?
Nope, 4.9 already had -mno-accumulate-outgoing-args with -Os.


[Bug target/63870] [Aarch64] [ARM] Errors in use of NEON intrinsics are reported incorrectly

2015-01-14 Thread cbaylis at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63870

--- Comment #6 from cbaylis at gcc dot gnu.org ---
There is still a lot to do. I have patches in progress for Aarch64 loads and
stores. Aarch64 shifts still need doing, and everything for ARM.


[Bug target/64460] ARM ICE on valid code

2015-01-14 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64460

Joel Sherrill  changed:

   What|Removed |Added

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

--- Comment #12 from Joel Sherrill  ---
(In reply to ktkachov from comment #11)
> Joel, can you try trunk after this commit to confirm that it fixes the ICE
> on your end and close this off if ok?

Based on today's results, I am closing this one. The following shows my
compiler version and compiling the original test case.

Thanks.

$ arm-rtems4.11-gcc --version
arm-rtems4.11-gcc (GCC) 5.0.0 20150114 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$  ~/test-gcc/install-head/bin/arm-rtems4.11-gcc -mcpu=xscale -Os -c
/tmp/gumstix.c 
$  ~/test-gcc/install-head/bin/arm-rtems4.11-gcc -mcpu=xscale -O2 -c
/tmp/gumstix.c


[Bug middle-end/64498] [5 Regression] Cannot build Firefox with LTO: ICE in substitute_and_fold_dom_walker::before_dom_children

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

--- Comment #6 from Martin Liška  ---
(In reply to Richard Biener from comment #5)
> Should be fixed now.
> 
> *** This bug has been marked as a duplicate of bug 64415 ***

I can confirm that it works for me.

Thanks,
Martin

[Bug middle-end/64353] [5 Regression] ICE: in execute_todo, at passes.c:1986

2015-01-14 Thread enkovich.gnu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64353

--- Comment #7 from Ilya Enkovich  ---
Right, wrong const attribute causes no VUSE for calls to the function which
leads to # VUSE <.MEM> generated for added loads and requires SSA update.

We may actually call update_ssa only in case of missing VUSE still allowing
optimization for functions wrongly marked as const.


[Bug target/63870] [Aarch64] [ARM] Errors in use of NEON intrinsics are reported incorrectly

2015-01-14 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63870

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ktkachov at gcc dot gnu.org

--- Comment #5 from ktkachov at gcc dot gnu.org ---
Can this be closed now?


[Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)

2015-01-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340

--- Comment #4 from Richard Biener  ---
ISTR that preloading pid_t was necessary for ada (basically all types required
from some builtins are required to be preloaded).


[Bug middle-end/64353] [5 Regression] ICE: in execute_todo, at passes.c:1986

2015-01-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64353

--- Comment #6 from Richard Biener  ---
Note the testcase is bogus because xx is clearly loading from global memory and
thus should be pure only.

Of course we should still not ICE here and treat xx as if it were const.

One possibility is to simply never apply IPA SRA to const functions.

Note that we will miscompile things if you change C::i to

void C::i()
{
  x = 1;
  if (xx())
   x = 0;
}

and you add noinline to xx.  sinking will then sink the x = 1 store
to the else arm (because of the bogus const attribute).


[Bug middle-end/64498] [5 Regression] Cannot build Firefox with LTO: ICE in substitute_and_fold_dom_walker::before_dom_children

2015-01-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64498

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #5 from Richard Biener  ---
Should be fixed now.

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


[Bug middle-end/64415] [5 Regression] ICE: verify_ssa failed / segmentation fault with LTO

2015-01-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64415

Richard Biener  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #6 from Richard Biener  ---
*** Bug 64498 has been marked as a duplicate of this bug. ***


[Bug fortran/64528] [5 Regression] ICE: in process_constraint, at tree-ssa-structalias.c:3002 with -O -fno-tree-ccp -fno-tree-dce

2015-01-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64528

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #5 from Richard Biener  ---
Fixed.


[Bug go/64595] cgo installed into wrong directory

2015-01-14 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64595

--- Comment #4 from Ian Lance Taylor  ---
To invoke cgo, put this code in a file foo.go and type "go run foo.go" (or "go
build foo.go && ./foo").


package main

// #include 
// void cprintln(const char *s) { puts(s); }
import "C"

func main() {
C.cprintln(C.CString("Hello, world"))
}


[Bug c++/24161] [3.4/4.0/4.1 Regression] Lookup of template member function finds global type.

2015-01-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24161

--- Comment #13 from Jonathan Wakely  ---
EDG gives the same error as GCC


[Bug c/64509] _Generic throws error in unselected generic association

2015-01-14 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64509

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Marek Polacek  ---
(In reply to Martien de Jong from comment #4)
> BTW, I notice that
> 
> ./gcc/ginclude/tgmath.h
> 
> uses
> 
> __builtin_classify_type
> __builtin_types_compatible_p
> __builtin_choose_expr
> 
> Will it move to using _Generic() ?

I think it will over time (with a proper __GNUC_PREREQ guard).

Anyway, there is nothing to do for this bug, so closing.


[Bug c++/24161] [3.4/4.0/4.1 Regression] Lookup of template member function finds global type.

2015-01-14 Thread cameron314 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24161

Cameron  changed:

   What|Removed |Added

 CC||cameron314 at gmail dot com

--- Comment #12 from Cameron  ---
VS2013 accepts this too.


[Bug c/64515] Segmentation fault during linker operation in gcc for arm-none-eabi

2015-01-14 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64515

Marek Polacek  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Marek Polacek  ---
Let's close this.


[Bug tree-optimization/64597] New: ICE when optimizing with AutoFDO annotation

2015-01-14 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64597

Bug ID: 64597
   Summary: ICE when optimizing with AutoFDO annotation
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rearnsha at gcc dot gnu.org
CC: dehao at gcc dot gnu.org
Target: x86_64-linux-gnu

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

Compiling the attached testcase with -g -fauto-profile=profile.gcov  -O2,
generates the following ICE.

Note that the testcase has been reduced from the original, but still exhibits
the same ICE.

try.cc: In member function ‘void regwayobj::makebound2(regboundart&,
regboundart&)’:
try.cc:167771832:1: internal compiler error: tree check: expected ssa_name,
have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2745
0x128a0ba tree_check_failed(tree_node const*, char const*, int, char const*,
...)
/home/rearnsha/gnusrc/gcc/trunk/gcc/tree.c:9255
0x6df619 tree_check(tree_node*, char const*, int, char const*, tree_code)
/home/rearnsha/gnusrc/gcc/trunk/gcc/tree.h:2770
0x10ba592 walk_aliased_vdefs_1
/home/rearnsha/gnusrc/gcc/trunk/gcc/tree-ssa-alias.c:2745
0x10ba79d walk_aliased_vdefs(ao_ref*, tree_node*, bool (*)(ao_ref*, tree_node*,
void*), void*, bitmap_head**, bool*)
/home/rearnsha/gnusrc/gcc/trunk/gcc/tree-ssa-alias.c:2797
0xd667a8 parm_ref_data_preserved_p
/home/rearnsha/gnusrc/gcc/trunk/gcc/ipa-prop.c:992
0xd66c66 ipa_load_from_parm_agg_1
/home/rearnsha/gnusrc/gcc/trunk/gcc/ipa-prop.c:1104
0xd66d02 ipa_load_from_parm_agg(ipa_node_params*, gimple_statement_base*,
tree_node*, int*, long*, bool*)
/home/rearnsha/gnusrc/gcc/trunk/gcc/ipa-prop.c:1124
0xd5088a unmodified_parm_or_parm_agg_item
/home/rearnsha/gnusrc/gcc/trunk/gcc/ipa-inline-analysis.c:1621
0xd522f2 will_be_nonconstant_predicate
/home/rearnsha/gnusrc/gcc/trunk/gcc/ipa-inline-analysis.c:2082
0xd54519 estimate_function_body_sizes
/home/rearnsha/gnusrc/gcc/trunk/gcc/ipa-inline-analysis.c:2701
0xd55746 compute_inline_parameters(cgraph_node*, bool)
/home/rearnsha/gnusrc/gcc/trunk/gcc/ipa-inline-analysis.c:2954
0x1766e45 early_inline
/home/rearnsha/gnusrc/gcc/trunk/gcc/auto-profile.c:1549
0x1766f90 auto_profile
/home/rearnsha/gnusrc/gcc/trunk/gcc/auto-profile.c:1613
0x17671ce execute
/home/rearnsha/gnusrc/gcc/trunk/gcc/auto-profile.c:1716
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug tree-optimization/59354] [4.8/4.9 Regression] Element swizzling produces invalid result with -O3

2015-01-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354

Richard Biener  changed:

   What|Removed |Added

  Known to work||5.0
Summary|[4.8/4.9/5 Regression]  |[4.8/4.9 Regression]
   |Element swizzling produces  |Element swizzling produces
   |invalid result with -O3 |invalid result with -O3

--- Comment #14 from Richard Biener  ---
Fixed on trunk sofar.


[Bug tree-optimization/59354] [4.8/4.9/5 Regression] Element swizzling produces invalid result with -O3

2015-01-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354

--- Comment #13 from Richard Biener  ---
Author: rguenth
Date: Wed Jan 14 14:06:07 2015
New Revision: 219603

URL: https://gcc.gnu.org/viewcvs?rev=219603&root=gcc&view=rev
Log:
2015-01-14  Richard Biener  

PR tree-optimization/59354
* tree-vect-slp.c (vect_build_slp_tree_1): Treat loads from
groups larger than the slp group size as having gaps.

* gcc.dg/vect/pr59354.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/vect/pr59354.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-slp.c


[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2015-01-14 Thread amacleod at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448

--- Comment #24 from Andrew Macleod  ---
Author: amacleod
Date: Wed Jan 14 13:58:35 2015
New Revision: 219601

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

2015-01-14  Andrew MacLeod  

PR middle-end/59448
* builtins.c (get_memmodel): Promote consume to acquire always.
* testsuite/gcc.dg/atomic-invalid.c: Remove obselete test for illegal
consume in an atomic_exchange.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/atomic-invalid.c


[Bug target/64386] ICE: in extract_insn, at recog.c:2327 (unrecognizable insn) with -mavx512bw

2015-01-14 Thread tocarip at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64386

--- Comment #3 from tocarip at gcc dot gnu.org ---
Author: tocarip
Date: Wed Jan 14 13:55:06 2015
New Revision: 219600

URL: https://gcc.gnu.org/viewcvs?rev=219600&root=gcc&view=rev
Log:
PR target/64386

gcc/
PR target/64386
* config/i386/i386.c (ix86_expand_sse_cmp): Handle V64QImode,
V32HImode.

testsuite/ 
* gcc.target/i386/pr64386.c: New test.

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


[Bug target/64393] ICE: in extract_insn, at recog.c:2327 (unrecognizable insn) with -mavx512vbmi

2015-01-14 Thread tocarip at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64393

--- Comment #3 from tocarip at gcc dot gnu.org ---
Author: tocarip
Date: Wed Jan 14 13:49:58 2015
New Revision: 219599

URL: https://gcc.gnu.org/viewcvs?rev=219599&root=gcc&view=rev
Log:
PR target/64393

gcc/
* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI_SET):
Enable AVX512BW.
(OPTION_MASK_ISA_AVX512BW_UNSET): Disable AVX512VBMI.
* config/i386/i386.c (ix86_hard_regno_mode_ok): Don't check
AVX512VBMI, as it implies AVX512BW.

testsuite/

* gcc.target/i386/pr64393.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr64393.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/common/config/i386/i386-common.c
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog


[Bug target/64387] ICE: in extract_insn, at recog.c:2327 (unrecognizable insn) with -ffloat-store -mavx512er

2015-01-14 Thread tocarip at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64387

--- Comment #3 from tocarip at gcc dot gnu.org ---
Author: tocarip
Date: Wed Jan 14 13:45:49 2015
New Revision: 219598

URL: https://gcc.gnu.org/viewcvs?rev=219598&root=gcc&view=rev
Log:
PR target/64387

gcc/
* config/i386/sse.md (vec_unpacks_hi_v8sf): Fix predicate.
(vec_unpacks_hi_v16sf): Ditto.

testsuite/
* gcc.target/i386/pr64387.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr64387.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/sse.md
trunk/gcc/testsuite/ChangeLog


[Bug go/64595] cgo installed into wrong directory

2015-01-14 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64595

--- Comment #3 from rguenther at suse dot de  ---
On Wed, 14 Jan 2015, ian at airs dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64595
> 
> --- Comment #2 from Ian Lance Taylor  ---
> Right, cgo is not run directly.  It is run by the go tool.  It is in effect an
> internal program like cc1.

Ah - the README didn't say that.

> The version suffix should be fine if libexecsubdir in libgo matches
> libexecsubdir in gotools, as the go tool will locate cgo via the variable
> theGccgoToolDir written to version.go by libgo/Makefile.  I'll see if that
> works with --enable-versions-specific-runtime-libs.

Any example use that will end up executing cgo so I can check it out 
locally?

> The docs are online at http://golang.org/cmd/{go,gofmt,cgo} which is where 
> most
> people read them.The docs come from the program source
> (libgo/go/cmd/*/doc.go).  The programs also have -help options.  Would you 
> like
> me to add small man pages that direct people to the web pages?

Yes, that would be convenient!  (obviously cgo doesn't need a manpage 
then)


[Bug tree-optimization/64365] [4.9/5 Regression] Predictive commoning after loop vectorization produces incorrect code.

2015-01-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64365

--- Comment #6 from Richard Biener  ---
ICK.  Data-ref analysis issue with respect to how we handle pointer IVs
in dr_analyze_indices.  This results in

(compute_affine_dependence
  stmt_a: MEM[(int *)vectp_in.21_137] = vect__12.23_139;
  stmt_b: vect__16.26_145 = MEM[(int *)vectp_in.24_143];
(analyze_overlapping_iterations
  (chrec_a = {204B(OVF), +, 18446744073709551600}_1)
  (chrec_b = {216B(OVF), +, 18446744073709551600}_1)
(analyze_siv_subscript
(analyze_subscript_affine_affine
  (overlaps_a = no dependence)
  (overlaps_b = no dependence))
)
  (overlap_iterations_a = no dependence)
  (overlap_iterations_b = no dependence))
) -> no dependence

but this is only because 216 + n * (-16) never aliases index-wise.  That is,
data-ref analysis doesn't know about access sizes and in this case we have
partly overlapping vector accesses (it would treat exact overlaps correctly).
Unfortunately with partial overlaps being possible there is no way to
reduce a [ offset, size ] range down to a single index (even if all sizes
are equal).  In this special case we may see that the initial condition
is a constant and thus somehow gracefully "fail" (and for non-constant
initial condition hope we can't compute the dependence distance).

The pragmatic solution is to simply make possibly overlapping accesses
have distinct bases by adjusting CHREC_LEFT to be a multiple of the
access size.

Index: gcc/tree-data-ref.c
===
--- gcc/tree-data-ref.c (revision 219592)
+++ gcc/tree-data-ref.c (working copy)
@@ -883,6 +883,8 @@ dr_analyze_innermost (struct data_refere
@@ -970,7 +972,8 @@ dr_analyze_indices (struct data_referenc

   /* If the address operand of a MEM_REF base has an evolution in the
  analyzed nest, add it as an additional independent access-function.  */
-  if (TREE_CODE (ref) == MEM_REF)
+  if (TREE_CODE (ref) == MEM_REF
+  && TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (ref))) == INTEGER_CST)
 {
   op = TREE_OPERAND (ref, 0);
   access_fn = analyze_scalar_evolution (loop, op);
@@ -992,6 +995,15 @@ dr_analyze_indices (struct data_referenc
fold_convert (ssizetype, memoff));
  memoff = build_int_cst (TREE_TYPE (memoff), 0);
}
+ /* Adjust the offset so it is a multiple of the access type
+size and thus we separate bases that can possibly be used
+to produce partial overlaps (which the access_fn machinery
+cannot handle).  */
+ wide_int rem
+   = wi::mod_trunc (off, TYPE_SIZE_UNIT (TREE_TYPE (ref)), SIGNED);
+ off = wide_int_to_tree (ssizetype, wi::sub (off, rem));
+ memoff = wide_int_to_tree (TREE_TYPE (memoff), rem);
+ /* And finally replace the initial condition.  */
  access_fn = chrec_replace_initial_condition
  (access_fn, fold_convert (orig_type, off));
  /* ???  This is still not a suitable base object for


  1   2   >