[Bug c/65117] xtensa: With -Os, invalid parameter c1 for reg_class_subset_p() to cause segment fault.

2015-02-22 Thread gang.chen.5i5j at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65117

--- Comment #1 from Chen Gang  ---
The root cause is in function 'find_reload' (at least it should be a real
cause):

- 'this_alternative_match_win' is not initialized before use it -- for the
first looping 0, it initializes 'this_alternative_match_win[0]', but
'did_match' may use 'this_alternative_match_win[2]'.

- 'this_alternative' is not initialized before use it -- it initializes
this_alternative[i], but may use this_alternative[m] (m > i).

After initialize the 2 arrays with 0, this issue can be fixed (r100.i can pass
compiling).


[Bug target/65117] xtensa: With -Os, invalid parameter c1 for reg_class_subset_p() to cause segment fault.

2015-02-22 Thread gang.chen.5i5j at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65117

--- Comment #2 from Chen Gang  ---
Oh, sorry, one typo issue: 'this_alternative_match_win' is incorrect, it should
be 'this_alternative_win'.


[Bug c++/65160] Linker forgets definition of type_info::__is_pointer_p

2015-02-22 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65160

Andreas Schwab  changed:

   What|Removed |Added

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

--- Comment #1 from Andreas Schwab  ---
.

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


[Bug c++/65159] Linker forgets definition of type_info::__is_pointer_p

2015-02-22 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65159

--- Comment #1 from Andreas Schwab  ---
*** Bug 65160 has been marked as a duplicate of this bug. ***


[Bug target/65161] New: ICE: in vec<_haifa_insn_data, va_heap, vl_embed>::operator[], at vec.h:736 with -O3 -fselective-scheduling2 -mtune=slm

2015-02-22 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65161

Bug ID: 65161
   Summary: ICE: in vec<_haifa_insn_data, va_heap,
vl_embed>::operator[], at vec.h:736 with -O3
-fselective-scheduling2 -mtune=slm
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz

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

Compiler output:
$ gcc -O3 -fselective-scheduling2 --param=max-completely-peeled-insns=527
--param=max-completely-peel-times=225 --param=min-vect-loop-bound=43 -mtune=slm
testcase.c 
testcase.c: In function 'foo':
testcase.c:10:1: internal compiler error: in operator[], at vec.h:736
 }
 ^
0x5abcde vec<_haifa_insn_data, va_heap, vl_embed>::operator[](unsigned int)
/mnt/svn/gcc-trunk/gcc/vec.h:736
0xf304c6 vec<_haifa_insn_data, va_heap, vl_embed>::operator[](unsigned int)
/mnt/svn/gcc-trunk/gcc/config/i386/i386.c:26672
0xf304c6 vec<_haifa_insn_data, va_heap, vl_ptr>::operator[](unsigned int)
/mnt/svn/gcc-trunk/gcc/vec.h:1202
0xf304c6 swap_top_of_ready_list
/mnt/svn/gcc-trunk/gcc/config/i386/i386.c:26661
0xf304c6 ix86_sched_reorder
/mnt/svn/gcc-trunk/gcc/config/i386/i386.c:26740
0xc0e83d invoke_reorder_hooks
/mnt/svn/gcc-trunk/gcc/sel-sched.c:4129
0xc0e83d find_best_expr
/mnt/svn/gcc-trunk/gcc/sel-sched.c:4406
0xc0e83d fill_insns
/mnt/svn/gcc-trunk/gcc/sel-sched.c:5568
0xc0f73a schedule_on_fences
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7393
0xc0f73a sel_sched_region_2
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7531
0xc11025 sel_sched_region_1
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7573
0xc11025 sel_sched_region(int)
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7674
0xc12021 run_selective_scheduling()
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7750
0xbea6e5 rest_of_handle_sched2
/mnt/svn/gcc-trunk/gcc/sched-rgn.c:3647
0xbea6e5 execute
/mnt/svn/gcc-trunk/gcc/sched-rgn.c:3791
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

$ gcc -v
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-220888-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df
--enable-languages=c,c++,lto,fortran
--prefix=/mnt/svn/gcc-trunk/binary-220888-lto-fortran-checking-yes-rtl-df/
--without-cloog --without-ppl
Thread model: posix
gcc version 5.0.0 20150221 (experimental) (GCC)


[Bug fortran/64432] [5 Regression] SYSTEM_CLOCK(COUNT_RATE=rate) wrong result for integer(4)::rate

2015-02-22 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64432

--- Comment #28 from Dominique d'Humieres  ---
Bootstrapping with the patch in comment 26 fails with

/opt/gcc/build_w/./prev-gcc/xg++ -B/opt/gcc/build_w/./prev-gcc/
-B/opt/gcc/gcc4.10w/x86_64-apple-darwin14.1.0/bin/ -nostdinc++
-B/opt/gcc/build_w/prev-x86_64-apple-darwin14.1.0/libstdc++-v3/src/.libs
-B/opt/gcc/build_w/prev-x86_64-apple-darwin14.1.0/libstdc++-v3/libsupc++/.libs 
-I/opt/gcc/build_w/prev-x86_64-apple-darwin14.1.0/libstdc++-v3/include/x86_64-apple-darwin14.1.0
 -I/opt/gcc/build_w/prev-x86_64-apple-darwin14.1.0/libstdc++-v3/include 
-I/opt/gcc/work/libstdc++-v3/libsupc++
-L/opt/gcc/build_w/prev-x86_64-apple-darwin14.1.0/libstdc++-v3/src/.libs
-L/opt/gcc/build_w/prev-x86_64-apple-darwin14.1.0/libstdc++-v3/libsupc++/.libs
-c  -DIN_GCC_FRONTEND -g -O2  -gtoggle -DIN_GCC-fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common
 -DHAVE_CONFIG_H -I. -Ifortran -I../../work/gcc -I../../work/gcc/fortran
-I../../work/gcc/../include -I./../intl -I../../work/gcc/../libcpp/include
-I/opt/mp-new/include  -I../../work/gcc/../libdecnumber
-I../../work/gcc/../libdecnumber/dpd -I../libdecnumber
-I../../work/gcc/../libbacktrace -I/opt/mp-new/include  -o
fortran/trans-intrinsic.o -MT fortran/trans-intrinsic.o -MMD -MP -MF
fortran/.deps/trans-intrinsic.TPo ../../work/gcc/fortran/trans-intrinsic.c
../../work/gcc/fortran/trans-intrinsic.c: In function 'tree_node*
conv_intrinsic_system_clock(gfc_code*)':
../../work/gcc/fortran/trans-intrinsic.c:2675:8: error: variable 'type' set but
not used [-Werror=unused-but-set-variable]
   tree type, tmp;
^
cc1plus: all warnings being treated as errors

../../work/gcc/fortran/trans-intrinsic.c: In function 'tree_node*
conv_intrinsic_system_clock(gfc_code*)':
../../work/gcc/fortran/trans-intrinsic.c:2676:7: error: variable 'kind' set but
not used [-Werror=unused-but-set-variable]
   int kind, least, most;
   ^
cc1plus: all warnings being treated as errors

The following patch (code commented) fixes bootstrap

--- ../_clean/gcc/fortran/trans-intrinsic.c2015-01-17 21:48:17.0
+0100
+++ gcc/fortran/trans-intrinsic.c2015-02-22 11:48:14.0 +0100
@@ -2670,9 +2670,10 @@ conv_intrinsic_system_clock (gfc_code *c
 {
   stmtblock_t block;
   gfc_se count_se, count_rate_se, count_max_se;
-  tree arg1 = NULL_TREE, arg2 = NULL_TREE, arg3 = NULL_TREE;
-  tree type, tmp;
-  int kind;
+  tree arg1 = NULL_TREE, arg2 = NULL_TREE, arg3 = NULL_TREE,
+  arg4 = NULL_TREE;
+  tree tmp;
+  int least, most;

   gfc_expr *count = code->ext.actual->expr;
   gfc_expr *count_rate = code->ext.actual->next->expr;
@@ -2680,12 +2681,12 @@ conv_intrinsic_system_clock (gfc_code *c

   /* The INTEGER(8) version has higher precision, it is used if both COUNT
  and COUNT_MAX can hold 64-bit values, or are absent.  */
-  if ((!count || count->ts.kind >= 8)
+  /* if ((!count || count->ts.kind >= 8)
   && (!count_max || count_max->ts.kind >= 8))
 kind = 8;
   else
-kind = gfc_default_integer_kind;
-  type = gfc_get_int_type (kind);
+kind = gfc_default_integer_kind; */
+  /* type = gfc_get_int_type (kind); */

   /* Evaluate our arguments.  */
   if (count)


[Bug target/65162] New: [5 Regression][SH] Redundant tests when storing bswapped T bit result in unaligned mem

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

Bug ID: 65162
   Summary: [5 Regression][SH] Redundant tests when storing
bswapped T bit result in unaligned mem
   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*-*-*

The following example is taken from libav, which contains quite some uses of
this code pattern.

typedef unsigned short int uint16_t;
union unaligned_16 { uint16_t l; } __attribute__((packed));

int
test (unsigned char* buf, int bits_per_component)
{
  (((union unaligned_16 *)(buf))->l) =
__builtin_bswap16 (bits_per_component == 10 ? 1 : 0);

  return 0;
}

compiled with 4.8 / 4.9 and -m4 -O2:

mov r5,r0
cmp/eq  #10,r0
movtr0
swap.b  r0,r0
extu.w  r0,r0
extu.b  r0,r1
shlr8   r0
mov.b   r1,@r4
mov.b   r0,@(1,r4)
rts
mov #0,r0

compiled with 5.0 r220892:

mov r5,r0
cmp/eq  #10,r0
movtr1
swap.b  r1,r1  // r1 = T << 8
extu.w  r1,r1
tst r1,r1  // T = r1 == 0 = 1-T
mov #-1,r0
negcr0,r0  // r0 = 1-T = r1 != 0 = cmp/eq #10,r0
extu.b  r1,r2
mov.b   r0,@(1,r4) // @(1,r4) = cmp/eq #10,r0
mov.b   r2,@r4 // @r4 = 0
rts
mov #0,r0

This is caused by the introduction of the treg_set_expr stuff.
For some reason, combine tries to recalculate the 'other' stored byte and tries
this pattern:

Successfully matched this instruction:
(set (reg:SI 179)
(ne:SI (reg:SI 164 [ D.1476 ])
(const_int 0 [0])))

The resulting insn sequence looks roughly like this:

(set (reg:SI 169) (eq:SI (reg:SI 5 r5) (const_int 10)))
(set (reg:HI 170) (rotate:HI (subreg:HI (reg:SI 169) 0) (const_int 8)))
(set (reg:SI 164) (zero_extend:SI (reg:HI 170)))
(set (reg:SI 171) (zero_extend:SI (subreg:QI (reg:SI 164) 0)))
(set (mem:QI (reg/v/f:SI 166) (subreg:QI (reg:SI 171) 0)))
(set (reg:SI 179) (ne:SI (reg:SI 164) (const_int 0)))
(set (mem:QI (plus:SI (reg/v/f:SI 166) (const_int 1)))
 (subreg:QI (reg:SI 179) 0))


If the ne:SI pattern is not matched, the redundant comparison/test is not
emitted.

The sh_treg_combine.cc RTL was actually meant to handle such cases of repeated
T bit inversions/tests.  However, at the moment it is triggered by conditional
insns only.  Moreover, it currently will not look through zero_extend and the
rotate insns.

On the other hand, this seems to happen only for unaligned stores.  Examples
such as 

typedef unsigned short int uint16_t;
int
test_00 (unsigned short* buf, int bits_per_component)
{
  buf[0] =
__builtin_bswap16 (bits_per_component == 10 ? 1 : 0);

  return 0;
}

int
test_01 (unsigned char* buf, int bits_per_component)
{
  buf[0] =
__builtin_bswap16 (bits_per_component == 10 ? 1 : 0);

  return 0;
}

int
test_02 (unsigned char* buf, int bits_per_component)
{
  buf[0] =
__builtin_bswap16 (bits_per_component == 10 ? 1 : 0) >> 8;

  return 0;
}

int
test_03 (unsigned char* buf, int bits_per_component)
{
  buf[1] = __builtin_bswap16 (bits_per_component == 10 ? 1 : 0) >> 0;
  buf[0] = __builtin_bswap16 (bits_per_component == 10 ? 1 : 0) >> 8;

  return 0;
}

.. do not suffer from the problem.

Probably this problem will not be triggered after unaligned loads/stores have
been improved (PR 64306).


[Bug fortran/64432] [5 Regression] SYSTEM_CLOCK(COUNT_RATE=rate) wrong result for integer(4)::rate

2015-02-22 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64432

--- Comment #29 from Dominique d'Humieres  ---
Clean patch to avoid the errors: variable '*' set but not used

--- ../_clean/gcc/fortran/trans-intrinsic.c2015-01-17 21:48:17.0
+0100
+++ gcc/fortran/trans-intrinsic.c2015-02-22 13:02:40.0 +0100
@@ -2670,23 +2670,15 @@ conv_intrinsic_system_clock (gfc_code *c
 {
   stmtblock_t block;
   gfc_se count_se, count_rate_se, count_max_se;
-  tree arg1 = NULL_TREE, arg2 = NULL_TREE, arg3 = NULL_TREE;
-  tree type, tmp;
-  int kind;
+  tree arg1 = NULL_TREE, arg2 = NULL_TREE, arg3 = NULL_TREE,
+  arg4 = NULL_TREE;
+  tree tmp;
+  int least, most;

   gfc_expr *count = code->ext.actual->expr;
   gfc_expr *count_rate = code->ext.actual->next->expr;
   gfc_expr *count_max = code->ext.actual->next->next->expr;

-  /* The INTEGER(8) version has higher precision, it is used if both COUNT
- and COUNT_MAX can hold 64-bit values, or are absent.  */
-  if ((!count || count->ts.kind >= 8)
-  && (!count_max || count_max->ts.kind >= 8))
-kind = 8;
-  else
-kind = gfc_default_integer_kind;
-  type = gfc_get_int_type (kind);
-
   /* Evaluate our arguments.  */
   if (count)
 {

For the test don't forget that real(10) are not available on some platforms and
that real(16) may have different formats (I won't have access to my G5 until
the end of the coming week -> no testing on powerpc).


[Bug rtl-optimization/30957] Misscompare with variable expansion optimization

2015-02-22 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30957

--- Comment #23 from vries at gcc dot gnu.org ---
I've made the test-case pr30957-1.c match the current compiler behaviour. The
test-case made sense for the time the committed code was working in the
compiler. It then regressed at some point, and was marked as xfail.

Xfailing means that the *only* information you can get out of this test-case is
that foo returns -0.0 again.

We're better off testing the expected compiler behaviour, which might also
regress for all sorts of reasons unrelated to this PR.

As a bonus, we stop generating core files for this test, which give us no
information, and stop overwriting other core files that may actually have
relevance and could be for failures that are difficult to reproduce.


[Bug target/65162] [5 Regression][SH] Redundant tests when storing bswapped T bit result in unaligned mem

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

Oleg Endo  changed:

   What|Removed |Added

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

--- Comment #1 from Oleg Endo  ---
(In reply to Oleg Endo from comment #0)
> The following example is taken from libav, which contains quite some uses of
> this code pattern.
> 
> typedef unsigned short int uint16_t;
> union unaligned_16 { uint16_t l; } __attribute__((packed));
> 
> int
> test (unsigned char* buf, int bits_per_component)
> {
>   (((union unaligned_16 *)(buf))->l) =
> __builtin_bswap16 (bits_per_component == 10 ? 1 : 0);
> 
>   return 0;
> }
> 

BTW, it should actually translate to something like:

movr6,r0
cmp/eq#10,r0
movtr0
mov.br0,@(1,r4)
mov#0,r0
rts
mov.br0,@r4

or
movr6,r0
cmp/eq#10,r0
movtr0
mov.br0,@(1,r4)
shlr8   r0
rts
mov.br0,@r4


[Bug target/63892] [5 Regression] gcc.dg/sibcall-3.c fails on darwin with -m32

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

--- Comment #18 from Iain Sandoe  ---

so - next increment - simplification of the previous. 
(don't try to redirect callers if we don't have any) 

diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index e1af8bf..ca19967 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -660,7 +660,8 @@ sem_function::merge (sem_item *alias_item)
   /* When both alias and original are not overwritable, we can save
  the extra thunk wrapper for direct calls.  */
   redirect_callers
-   = (!original_discardable
+   = (alias->callers
+  && !original_discardable
   && !DECL_COMDAT_GROUP (alias->decl)
   && alias->get_availability () > AVAIL_INTERPOSABLE
   && original->get_availability () > AVAIL_INTERPOSABLE


Unfortunately, we're still not there.
I think that we can have a situation where we remove an alias which happens to
be the version that the vtable is pointing to (and so end up with an
unsatisfied reference from the vtable and link time).  

However, I still haven't figured out how to redirect those references…

[Bug target/65161] ICE: in vec<_haifa_insn_data, va_heap, vl_embed>::operator[], at vec.h:736 with -O3 -fselective-scheduling2 -mtune=slm

2015-02-22 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65161

--- Comment #1 from Zdenek Sojka  ---
Created attachment 34834
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34834&action=edit
testcase that doesn't need --param on cmd line

Compiler output:
$ gcc -O3 -fselective-scheduling2 -mtune=slm testcase.c 
testcase.c: In function 'foo':
testcase.c:11:1: internal compiler error: in operator[], at vec.h:736
 }
 ^
0x5abcde vec<_haifa_insn_data, va_heap, vl_embed>::operator[](unsigned int)
/mnt/svn/gcc-trunk/gcc/vec.h:736
0xf304c6 vec<_haifa_insn_data, va_heap, vl_embed>::operator[](unsigned int)
/mnt/svn/gcc-trunk/gcc/config/i386/i386.c:26672
0xf304c6 vec<_haifa_insn_data, va_heap, vl_ptr>::operator[](unsigned int)
/mnt/svn/gcc-trunk/gcc/vec.h:1202
0xf304c6 swap_top_of_ready_list
/mnt/svn/gcc-trunk/gcc/config/i386/i386.c:26661
0xf304c6 ix86_sched_reorder
/mnt/svn/gcc-trunk/gcc/config/i386/i386.c:26740
0xc0e83d invoke_reorder_hooks
/mnt/svn/gcc-trunk/gcc/sel-sched.c:4129
0xc0e83d find_best_expr
/mnt/svn/gcc-trunk/gcc/sel-sched.c:4406
0xc0e83d fill_insns
/mnt/svn/gcc-trunk/gcc/sel-sched.c:5568
0xc0f73a schedule_on_fences
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7393
0xc0f73a sel_sched_region_2
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7531
0xc11025 sel_sched_region_1
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7573
0xc11025 sel_sched_region(int)
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7674
0xc12021 run_selective_scheduling()
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7750
0xbea6e5 rest_of_handle_sched2
/mnt/svn/gcc-trunk/gcc/sched-rgn.c:3647
0xbea6e5 execute
/mnt/svn/gcc-trunk/gcc/sched-rgn.c:3791
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


[Bug middle-end/65163] New: [5 Regression][SH] ICE in decompose at rtl.h:2007

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

Bug ID: 65163
   Summary: [5 Regression][SH] ICE in decompose at rtl.h:2007
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: olegendo at gcc dot gnu.org
Target: sh*-*-*

The following example:

typedef unsigned int uint32_t;
union unaligned_32 { uint32_t l; } __attribute__((packed));

int
test (unsigned char* buf, int bits_per_component)
{
  (((union unaligned_32 *)(buf))->l) = __builtin_bswap32 (bits_per_component ==
10 ? 1 : 0);

  return 0;
}


compiled with -m4 -ml -O2 results in:

 internal compiler error: in decompose, at rtl.h:2007
 }
 ^
0x8708fa1 wi::int_traits >::decompose(long
long*, unsigned int, std::pair const&)
../../gcc-trunk/gcc/rtl.h:2005
0x8708fa1 wi::int_traits >::decompose(long
long*, unsigned int, std::pair const&)
../../gcc-trunk/gcc/simplify-rtx.c:3717
0x8708fa1 wide_int_ref_storage >
../../gcc-trunk/gcc/wide-int.h:948
0x8708fa1 generic_wide_int >
../../gcc-trunk/gcc/wide-int.h:725
0x8708fa1 neg_p >
../../gcc-trunk/gcc/wide-int.h:1694
0x8708fa1 simplify_const_binary_operation(rtx_code, machine_mode, rtx_def*,
rtx_def*)
../../gcc-trunk/gcc/simplify-rtx.c:4029
0x87077e3 simplify_binary_operation(rtx_code, machine_mode, rtx_def*, rtx_def*)
../../gcc-trunk/gcc/simplify-rtx.c:1987
0x870a9b6 simplify_gen_binary
../../gcc-trunk/gcc/simplify-rtx.c:212
0x8b6b047 if_then_else_cond
../../gcc-trunk/gcc/combine.c:8885
0x8b73a22 combine_simplify_rtx
../../gcc-trunk/gcc/combine.c:5492
0x8b7679f subst
../../gcc-trunk/gcc/combine.c:5429
0x8b76518 subst
../../gcc-trunk/gcc/combine.c:5374
0x8b76518 subst
../../gcc-trunk/gcc/combine.c:5374
0x8b78f03 try_combine
../../gcc-trunk/gcc/combine.c:3273
0x8b7f44f combine_instructions
../../gcc-trunk/gcc/combine.c:1309
0x8b7f44f rest_of_handle_combine
../../gcc-trunk/gcc/combine.c:14194
0x8b7f44f execute
../../gcc-trunk/gcc/combine.c:14237

... when combine tries to simplify the following rtx:

(and:SI (rotate:SI (reg:SI 170)
(const_int 16 [0x10]))
(const_int 4294901760 [0x]))

The problem is that in sh.md the constant 0x is not written as sign
extended hwi values.

It's actually a latent bug, which seems to have gone unnoticed so far.


[Bug target/65163] [5 Regression][SH] ICE in decompose at rtl.h:2007

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

Oleg Endo  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-02-22
  Component|middle-end  |target
 Ever confirmed|0   |1

--- Comment #1 from Oleg Endo  ---
The following seems to fix the issue:

Index: gcc/config/sh/sh.md
===
--- gcc/config/sh/sh.md(revision 220892)
+++ gcc/config/sh/sh.md(working copy)
@@ -6218,7 +6218,7 @@
 (define_insn "swapbsi2"
   [(set (match_operand:SI 0 "arith_reg_dest" "=r")
 (ior:SI (and:SI (match_operand:SI 1 "arith_reg_operand" "r")
-(const_int 4294901760))
+(const_int -65536)) ;; 0x
 (ior:SI (and:SI (ashift:SI (match_dup 1) (const_int 8))
 (const_int 65280))
 (and:SI (ashiftrt:SI (match_dup 1) (const_int 8))
@@ -6286,7 +6286,7 @@
 (define_peephole2
   [(set (match_operand:SI 0 "arith_reg_dest" "")
 (ior:SI (and:SI (match_operand:SI 1 "arith_reg_operand" "")
-(const_int 4294901760))
+(const_int -65536)) ;; 0x
 (ior:SI (and:SI (ashift:SI (match_dup 1) (const_int 8))
 (const_int 65280))
 (and:SI (ashiftrt:SI (match_dup 1) (const_int 8))
@@ -6296,7 +6296,7 @@
   "TARGET_SH1 && peep2_reg_dead_p (2, operands[0])"
   [(set (match_dup 2)
 (ior:SI (and:SI (match_operand:SI 1 "arith_reg_operand" "")
-(const_int 4294901760))
+(const_int -65536)) ;; 0x
 (ior:SI (and:SI (ashift:SI (match_dup 1) (const_int 8))
 (const_int 65280))
 (and:SI (ashiftrt:SI (match_dup 1) (const_int 8))


[Bug target/65151] [SH][4.9 Regression] Internal compiler error when trying to build libav 11.2 on sh4

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

Oleg Endo  changed:

   What|Removed |Added

 CC||kkojima at gcc dot gnu.org

--- Comment #8 from Oleg Endo  ---
I've also tried to see if the movrt pattern on SH2A has the same problem.  But
the only thing that seems to trigger it is a movt.  The patch in c#7 could also
be applied to trunk, just in case.  But I'm not sure if we should do so,
because on trunk the problem doesn't happen and I actually don't like the hunk
for sh_hard_regno_mode_ok, as everything in the backend treats T_REG as SImode.
Kaz, do you have any opinions?


[Bug target/64306] [SH] Improve unaligned loads and stores

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

Oleg Endo  changed:

   What|Removed |Added

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

--- Comment #2 from Oleg Endo  ---
When storing bswapped values to unaligned mems the following happens:

union unaligned32s { int val; } __attribute__((packed));

void store_32s_0 (unsigned char* x, unsigned char a, int b)
{
  ((union unaligned32s*)(x))->val = a;
}

mov #0,r0
extu.b  r5,r5
mov.b   r0,@(1,r4)
mov.b   r0,@(2,r4)
mov r5,r0// r0 = zero (redundant load)
shlr16  r0   // 0 >> 16 (redundant shift)
mov.b   r5,@r4
shlr8   r0   // 0 >> 8 (redundant shift)
rts
mov.b   r0,@(3,r4)

should be:
mov.b   r5,@r4
mov #0,r0
mov.b   r0,@(1,r4)
mov.b   r0,@(2,r4)
mov.b   r0,@(3,r4)



void store_32s_1 (unsigned char* x, unsigned char a, int b)
{
  ((union unaligned32s*)(x))->val = __builtin_bswap32 (a);
}

extu.b  r5,r5
swap.b  r5,r5
swap.w  r5,r5
extu.b  r5,r1
mov.b   r1,@r4
mov #0,r1
mov r1,r0
mov.b   r0,@(1,r4)
mov.b   r0,@(2,r4)
mov r5,r0
shlr16  r0
shlr8   r0
rts
mov.b   r0,@(3,r4)


should be:
mov #0,r0
mov.b   r0,@(0,r4)
mov.b   r0,@(1,r4)
mov.b   r0,@(2,r4)
mov r5,r0
mov.b   r0,@(3,r4)

A similar thing happens when storing the T bit to unaligned mems, see also PR
65162.


[Bug testsuite/65126] [5 Regresion] additional_sources not defined anymore during dg-final

2015-02-22 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

--- Comment #6 from vries at gcc dot gnu.org ---
Created attachment 34835
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34835&action=edit
Tentative patch

works for vect-simd-clone-10.c


[Bug target/65153] [SH][4.9 Regression] "insn does not satisfy its constraints" when compiling libmcrypt

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

--- Comment #8 from Oleg Endo  ---
It seems that the problematic peephole is trying to wallpaper some unlucky
register allocation/reload choices like:

before peephole:
mov.w.L26,r1
addr8,r1
movr1,r8
mov#0,r1
mov.lr1,@(32,r8)

after peephole:
mov.w.L26,r1
addr8,r1
mov#0,r8
mov.lr8,@(32,r1)

I've tried to disable the peephole on trunk and compared CSiBE results.  It
seems the peephole doesn't hit very often:
sum:  3371887 -> 3371943+56 / +0.001661 %

So we could probably remove the complex peephole without a big loss.

I have a set of similar but simpler peepholes with a higher hit rate.  Maybe we
can replace the complex peephole with some simpler ones.


[Bug testsuite/65126] [5 Regression] additional_sources not defined anymore during dg-final

2015-02-22 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

vries at gcc dot gnu.org changed:

   What|Removed |Added

Summary|[5 Regresion]   |[5 Regression]
   |additional_sources not  |additional_sources not
   |defined anymore during  |defined anymore during
   |dg-final|dg-final

--- Comment #7 from vries at gcc dot gnu.org ---
fix Regression typo


[Bug tree-optimization/64950] postpone expanding va_arg till pass_stdarg

2015-02-22 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64950

vries at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||patch

--- Comment #1 from vries at gcc dot gnu.org ---
stage 1 patch submitted:
https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01166.html


[Bug ada/65100] ada/gnat-style.texi:568: warning: @itemize has text but no @item

2015-02-22 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65100

--- Comment #1 from vries at gcc dot gnu.org ---
Author: vries
Date: Sun Feb 22 15:16:59 2015
New Revision: 220895

URL: https://gcc.gnu.org/viewcvs?rev=220895&root=gcc&view=rev
Log:
Fix warning in 'Loop Statements' in gnat-style.texi

2015-02-22  Tom de Vries  

PR ada/65100
* gnat-style.texi (@subsection Loop Statements): Replace @noindent by
@item, and fix warning '@itemize has text but no @item'.

Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/gnat-style.texi


[Bug ada/65102] gnat-style.texi warning from including fdl.texi

2015-02-22 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65102

vries at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||patch

--- Comment #1 from vries at gcc dot gnu.org ---
https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01335.html


[Bug ada/65100] ada/gnat-style.texi:568: warning: @itemize has text but no @item

2015-02-22 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65100

vries at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #2 from vries at gcc dot gnu.org ---
Marking as resolved, fixed


[Bug target/64113] Gcc on Alpha: Error: No lda !gpdisp!282 was found

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

--- Comment #6 from uros at gcc dot gnu.org ---
Author: uros
Date: Sun Feb 22 15:29:16 2015
New Revision: 220896

URL: https://gcc.gnu.org/viewcvs?rev=220896&root=gcc&view=rev
Log:
Backport from mainline
2014-12-02  Uros Bizjak  

PR target/64113
* config/alpha/alpha.md (call_value_osf_tlsgd): Do not split insn
using post-reload splitter.  Use peephole2 pass instead.
(call_value_osf_tlsldm): Ditto.
(TLS_CALL): New int iterator.
(tls): New int attribute.
(call_value_osf_): Merge insn pattern from call_value_osf_tlsgd
and call_value_tlsldm using TLS_CALL int iterator.


Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/alpha/alpha.md


[Bug target/65164] New: [5 Regression][SH] missed subc in integer sign function

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

Bug ID: 65164
   Summary: [5 Regression][SH] missed subc in integer sign
function
   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*-*-*

These are integer sign functions taken from a book.
For some of them the code got worse after the introduction of the treg_set_expr
stuff.

int signfunc_00 (int x)
{
  return (x >> 31) | ((unsigned int)(-x) >> 31);
}


int signfunc_01 (int x)
{
  return -((unsigned int)x >> 31) | ((unsigned int)(-x) >> 31);
}


int signfunc_02 (int x)
{
  return (x > 0) - (x < 0);
}

4.9:
cmp/pl  r4
movtr0
shllr4
movtr4
rts
sub r4,r0

trunk:
mov r4,r1
shllr1
movtr1
cmp/pl  r4
movtr0
rts
sub r1,r0


int signfunc_03 (int x)
{
  return (x >= 0) - (x <= 0);
}

4.9:
cmp/pz  r4
mov #0,r1
movtr0
cmp/ge  r4,r1
rts
subcr1,r0

trunk:
mov #0,r1
cmp/ge  r4,r1
movtr1
cmp/pz  r4
movtr0
rts
sub r1,r0

It seems that this requires a pattern like

(set (match_operand:SI 0 "arith_reg_dest")
 (minus:SI (match_operand 1 "treg_set_expr")
   (match_operand 2 "treg_set_expr")))


For signfunc_02, combine is looking for the pattern:

Failed to match this instruction:
(set (reg:SI 169 [ D.1518 ])
(minus:SI (gt:SI (reg/v:SI 168 [ x ])
(const_int 0 [0]))
(lshiftrt:SI (reg/v:SI 168 [ x ])
(const_int 31 [0x1f]

For signfunc_03, combine is looking for the pattern:
(set (reg:SI 169 [ D.1522 ])
(minus:SI (ge:SI (reg:SI 4 r4 [ x ])
(const_int 0 [0]))
(le:SI (reg:SI 4 r4 [ x ])
(const_int 0 [0]



On SH, it seems that the insn sequence
cmp/pz  r4
mov #0,r1
movtr0
cmp/ge  r4,r1
subcr1,r0

is the best to realize an integer sign function.  So actually all the functions
above should be converted into the same sequence.


[Bug target/63892] [5 Regression] gcc.dg/sibcall-3.c fails on darwin with -m32

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

--- Comment #19 from Iain Sandoe  ---
Created attachment 34836
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34836&action=edit
testcase to discuss.

So with the patch above, I get a failure to build LLVM stage#1.

the .ii here is a reduced case.

TBH , I'm not sure what to make of this - on a debugging stage#1 compiler on
Darwin (only need a cc1plus).

gcc/cc1plus -fpreprocessed t.ii -fPIC -quiet -dumpbase t.ii
-mmacosx-version-min=10.8.6 -mtune=core2 -auxbase t -O2 -std=c++11 -version -o
t.s


I'm not understanding why getAnalysisUsage() is saying it's called by
addEscapingUse() and vice-versa … that's not what the source says.

Is this because the bodies of the functions are equivalent (i.e. both empty)?

In which case I guess the referring pointers need to be moved to the original
before the alias is deleted… not 100% sure how to do that .. 

---

Breakpoint 2, ipa_icf::sem_function::merge (this=0x142a21660,
alias_item=0x142a21860) at /GCC/gcc-trunk/gcc/ipa-icf.c:734
734alias->remove ();
(gdb) p alias->debug()
_ZNK12_GLOBAL__N_14NoAA16getAnalysisUsageERN4llvm13AnalysisUsageE/9 (virtual
void {anonymous}::NoAA::getAnalysisUsage(llvm::AnalysisUsage&) const)
@0x143969310
  Type: function definition analyzed
  Visibility: prevailing_def_ironly virtual
  Address is taken.
  References: 
  Referring: _ZTVN12_GLOBAL__N_14NoAAE/17 (addr)
  Availability: available
  First run: 0
  Function flags: body icf_merged
  Called by: 
  Calls: 
$1 = void
Current language:  auto; currently c++
(gdb) p original->debug()
_ZN12_GLOBAL__N_14NoAA14addEscapingUseERN4llvm3UseE/11 (virtual void
{anonymous}::NoAA::addEscapingUse(llvm::Use&)) @0x143975188
  Type: function definition analyzed
  Visibility: prevailing_def_ironly virtual
  Address is taken.
  References: 
  Referring: _ZTVN12_GLOBAL__N_14NoAAE/17 (addr)
  Availability: available
  First run: 0
  Function flags: body
  Called by:
_ZThn8_NK12_GLOBAL__N_14NoAA16getAnalysisUsageERN4llvm13AnalysisUsageE/10 (1.00
per call) _ZThn8_N12_GLOBAL__N_14NoAA14addEscapingUseERN4llvm3UseE/12 (1.00 per
call) 
  Calls: 
$2 = void
(gdb) p local_original->debug()
_ZN12_GLOBAL__N_14NoAA14addEscapingUseERN4llvm3UseE/11 (virtual void
{anonymous}::NoAA::addEscapingUse(llvm::Use&)) @0x143975188
  Type: function definition analyzed
  Visibility: prevailing_def_ironly virtual
  Address is taken.
  References: 
  Referring: _ZTVN12_GLOBAL__N_14NoAAE/17 (addr)
  Availability: available
  First run: 0
  Function flags: body
  Called by:
_ZThn8_NK12_GLOBAL__N_14NoAA16getAnalysisUsageERN4llvm13AnalysisUsageE/10 (1.00
per call) _ZThn8_N12_GLOBAL__N_14NoAA14addEscapingUseERN4llvm3UseE/12 (1.00 per
call) 
  Calls: 
$3 = void

[Bug target/63892] [5 Regression] gcc.dg/sibcall-3.c fails on darwin with -m32

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

--- Comment #20 from Iain Sandoe  ---
testing:
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index e1af8bf..4d72e42 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -660,7 +660,8 @@ sem_function::merge (sem_item *alias_item)
   /* When both alias and original are not overwritable, we can save
  the extra thunk wrapper for direct calls.  */
   redirect_callers
-   = (!original_discardable
+   = (alias->callers
+  && !original_discardable
   && !DECL_COMDAT_GROUP (alias->decl)
   && alias->get_availability () > AVAIL_INTERPOSABLE
   && original->get_availability () > AVAIL_INTERPOSABLE
@@ -724,7 +725,7 @@ sem_function::merge (sem_item *alias_item)

   /* The alias function is removed if symbol address
  does not matter.  */
-  if (!alias_address_matters)
+  if (!alias_address_matters && alias->ref_list.referring.is_empty())
alias->remove ();

   if (dump_file && redirected)


[Bug fortran/64432] [5 Regression] SYSTEM_CLOCK(COUNT_RATE=rate) wrong result for integer(4)::rate

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

--- Comment #30 from Jerry DeLisle  ---
(In reply to Dominique d'Humieres from comment #28 and #29)

Thanks for checking and I have the cleanup taken care of. I am making some
adjustments to avoid ABI issues as well.

Test case will be next.


[Bug libstdc++/65165] New: missing std::promise::set_value_at_thread_exit

2015-02-22 Thread carlo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65165

Bug ID: 65165
   Summary: missing std::promise::set_value_at_thread_exit
   Product: gcc
   Version: 4.9.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: carlo at gcc dot gnu.org

Assuming en.cppreference.com is right, this member function should exist since
C++11. See
http://en.cppreference.com/w/cpp/thread/promise/set_value_at_thread_exit

It exists/works in clang 3.5. I see no reference to this function anywhere on
gnu.org (ie, the status page), so I thought it might be something that has been
overlooked.


[Bug libstdc++/65165] missing std::promise::set_value_at_thread_exit

2015-02-22 Thread carlo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65165

--- Comment #1 from Carlo Wood  ---
The same for std::promise::set_exception_at_thread_exit I guess.


[Bug target/65166] New: [SH] use div1 to do R[n] = ((R[n] << 1) | T) - R[m]

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

Bug ID: 65166
   Summary: [SH] use div1 to do R[n] = ((R[n] << 1) | T) - R[m]
   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*-*-*

The single-step division instruction 'div1 Rm,Rn' does 

R[n] = ((R[n] << 1) | T) - R[m]

if M = 0 and Q = 0.
Thus it could be utilized to do that calculation.

I've added the following pattern

;; R[n] = ((R[n] << 1) | T) - R[m]
(define_insn "*div1"
  [(set (match_operand:SI 0 "arith_reg_dest" "=r")
(minus:SI (mult:SI (match_operand:SI 1 "arith_reg_operand" "0")
   (const_int 2))
  (match_operand:SI 2 "arith_reg_operand" "r")))
   (clobber (reg:SI T_REG))]
  "TARGET_SH1"
  "div1%1,%0"
  [(set_attr "type" "arith")])

and it seems it is hit a few times in CSiBE.
The pattern above will produce wrong code, due to lack of M = Q = T = 0 setting
before div1.  To fix that a div1 has to be prefixed with a div0u, which
eliminates the benefits over a regular 2 insn add,sub sequence.

For this to make sense the div0u insn should be eliminated if possible.  This
is difficult to do, because div1 insn itself also does:
  Q = (0x8000 & R[n])
  ? (((R[n] << 1) | T) - R[m]) == 0
  : (((R[n] << 1) | T) - R[m]) > R[n]

So effectively, both div0u and div1s have to be used as a pair.

If the T bit should be used as an input, the following patterns can be used
(also lacking div0u here):

;; R[n] = ((R[n] << 1) | T) - R[m]
(define_insn "div1"
  [(set (match_operand:SI 0 "arith_reg_dest" "=r")
(minus:SI (ior:SI (mult:SI (match_operand:SI 1 "arith_reg_operand" "0")
   (const_int 2))
  (reg:SI T_REG))
  (match_operand:SI 2 "arith_reg_operand" "r")))
(clobber (reg:SI T_REG))]
  "TARGET_SH1"
  "div1%1,%0"
  [(set_attr "type" "arith")])

(define_insn_and_split "*div1"
  [(set (match_operand:SI 0 "arith_reg_dest")
(minus:SI (ior:SI (mult:SI (match_operand:SI 1 "arith_reg_operand")
   (const_int 2))
  (match_operand 2 "treg_set_expr"))
  (match_operand:SI 3 "arith_reg_operand")))
   (clobber (reg:SI T_REG))]
  "TARGET_SH1 && can_create_pseudo_p ()"
  "#"
  "&& 1"
  [(const_int 0)]
{
  sh_treg_insns ti = sh_split_treg_set_expr (operands[2], curr_insn);
  emit_insn (gen_div1 (operands[0], operands[1], operands[3]));
  DONE;
})


[Bug target/65167] New: 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-22 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65167

Bug ID: 65167
   Summary: 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
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz

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

Compiler output:
$ gcc -O -fschedule-insns -fcheck-pointer-bounds -mmpx testcase.c
testcase.c: In function 'foo.chkp':
testcase.c:7:1: error: unable to find a register to spill
 }
 ^
testcase.c:7:1: error: this is the insn:
(insn 21 49 32 2 (parallel [
(unspec [
(mem:DI (unspec:DI [
(plus:DI (reg/f:DI 7 sp)
(const_int -8 [0xfff8]))
(subreg:DI (reg/v/f:DI 94 [ e ]) 0)
] UNSPEC_BNDLDX_ADDR) [0  S8 A8])
(reg:BND64 111 [orig:101 __chkp_bounds_of_e ] [101])
] UNSPEC_BNDSTX)
(set (mem/v:BLK (plus:DI (reg/f:DI 7 sp)
(const_int -8 [0xfff8])) [0  A8])
(unspec:BLK [
(mem/v:BLK (plus:DI (reg/f:DI 7 sp)
(const_int -8 [0xfff8])) [0  A8])
] UNSPEC_MPX_FENCE))
]) testcase.c:5 1067 {*bnd64_stx}
 (expr_list:REG_DEAD (reg:BND64 111 [orig:101 __chkp_bounds_of_e ] [101])
(expr_list:REG_DEAD (reg/v/f:DI 94 [ e ])
(nil
testcase.c:7:1: internal compiler error: in assign_by_spills, at
lra-assigns.c:1383
0xbcd308 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/mnt/svn/gcc-trunk/gcc/rtl-error.c:110
0xac5ef6 assign_by_spills
/mnt/svn/gcc-trunk/gcc/lra-assigns.c:1383
0xac6723 lra_assign()
/mnt/svn/gcc-trunk/gcc/lra-assigns.c:1558
0xac2042 lra(_IO_FILE*)
/mnt/svn/gcc-trunk/gcc/lra.c:2337
0xa705e1 do_reload
/mnt/svn/gcc-trunk/gcc/ira.c:5418
0xa705e1 execute
/mnt/svn/gcc-trunk/gcc/ira.c:5589
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

Tested revisions:
r220888 - fail


[Bug target/65032] [5 Regression] ICE in reload_combine_note_use, at postreload.c:1556 on i686-linux-gnu

2015-02-22 Thread pbrobinson at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65032

--- Comment #2 from pbrobinson at gmail dot com ---
Created attachment 34838
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34838&action=edit
preprocessed file from koji

this is from koji if it's of help or different from the other one


[Bug c++/65168] New: diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-02-22 Thread jan.kratochvil at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

Bug ID: 65168
   Summary: diagnostic: missing: reference cannot be bound to
dereferenced null pointer
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jan.kratochvil at redhat dot com
Target: x86_64-linux-gnu

int main() {
  int *p=static_cast(0),&r=*p;
  return !&r;
}

-Wall

g++ (GCC) 5.0.0 20150221 (experimental)


clang++ (clang-3.5.0-6.fc21.x86_64):
ref.C:3:12: warning: reference cannot be bound to dereferenced null pointer in
well-defined C++ code; pointer may be assumed to always convert to true
[-Wundefined-bool-conversion]

I have no idea if it can be miscompiled by either compiler.  Still I find
useful to be notified I write non-conforming C++ code.


[Bug target/65032] [5 Regression] ICE in reload_combine_note_use, at postreload.c:1556 on i686-linux-gnu

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

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|WAITING |NEW
 CC||trippels at gcc dot gnu.org

--- Comment #3 from Markus Trippelsdorf  ---
I cannot reproduce the original issue.

For the testcase from comment 2:

markus@x4 tmp % g++ -c -w -m32 -Os -std=gnu++11 -fPIC -fstack-protector-strong
-fno-strict-aliasing -fno-exceptions  -fomit-frame-pointer testc.ii

In file included from
/builddir/build/BUILD/firefox-36.0/mozilla-release/objdir/dom/media/ogg/Unified_cpp_dom_media_ogg0.cpp:20:0:
/builddir/build/BUILD/firefox-36.0/mozilla-release/dom/media/ogg/OggReader.cpp:
In member function ‘nsresult mozilla::OggReader::DecodeVorbis(ogg_packet*)’:
/builddir/build/BUILD/firefox-36.0/mozilla-release/dom/media/ogg/OggReader.cpp:562:1:
internal compiler error: in reload_combine_note_use, at postreload.c:1556
0xbf4b3a reload_combine_note_use
../../gcc/gcc/postreload.c:1556
0xbf48bf reload_combine_note_use
../../gcc/gcc/postreload.c:1643
0xbf65f3 reload_combine
../../gcc/gcc/postreload.c:1423
0xbf76e0 reload_cse_regs
../../gcc/gcc/postreload.c:95
0xbf76e0 execute
../../gcc/gcc/postreload.c:2367
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions

Reducing...

[Bug fortran/64980] [5 Regression] ICE in trans-expr.c

2015-02-22 Thread edlinger at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64980

--- Comment #21 from Bernd Edlinger  ---
Author: edlinger
Date: Sun Feb 22 19:38:53 2015
New Revision: 220899

URL: https://gcc.gnu.org/viewcvs?rev=220899&root=gcc&view=rev
Log:
2015-02-22  Bernd Edlinger  

PR fortran/64980
PR fortran/61960
* trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
for component references to class objects.
(gfc_conv_procedure_call): Compare the class by name.

testsuite:
2015-02-22  Bernd Edlinger  

PR fortran/64980
PR fortran/61960
* gfortran.dg/pr61960.f90: New.
* gfortran.dg/pr64230.f90: New.
* gfortran.dg/pr64980.f03: New.

Added:
trunk/gcc/testsuite/gfortran.dg/pr61960.f90
trunk/gcc/testsuite/gfortran.dg/pr64230.f90
trunk/gcc/testsuite/gfortran.dg/pr64980.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/61960] internal compiler error: in gfc_conv_component_ref

2015-02-22 Thread edlinger at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61960

--- Comment #2 from Bernd Edlinger  ---
Author: edlinger
Date: Sun Feb 22 19:38:53 2015
New Revision: 220899

URL: https://gcc.gnu.org/viewcvs?rev=220899&root=gcc&view=rev
Log:
2015-02-22  Bernd Edlinger  

PR fortran/64980
PR fortran/61960
* trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
for component references to class objects.
(gfc_conv_procedure_call): Compare the class by name.

testsuite:
2015-02-22  Bernd Edlinger  

PR fortran/64980
PR fortran/61960
* gfortran.dg/pr61960.f90: New.
* gfortran.dg/pr64230.f90: New.
* gfortran.dg/pr64980.f03: New.

Added:
trunk/gcc/testsuite/gfortran.dg/pr61960.f90
trunk/gcc/testsuite/gfortran.dg/pr64230.f90
trunk/gcc/testsuite/gfortran.dg/pr64980.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/61831] [4.9/ 5 Regression] runtime error: pointer being freed was not allocated

2015-02-22 Thread mikael at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61831

--- Comment #39 from Mikael Morin  ---
(In reply to Mikael Morin from comment #38)
> By the way, I'm not sure that it's at all correct to avoid deep copies.
This seems to be safe:
as long as the procedure is pure, there is no way it can modify its input data.

> It's an artefact of temporary management which on one hand avoids deep
> copies, but on the other hand frees allocated components as for a regular
> object, as if a deep copy had happened before.
So, the problem is limited to derived types, which basically come from
expressions
of type EXPR_FUNCTION (or its variants EXPR_PPC, EXPR_COMPCALL), EXPR_ARRAY,
and EXPR_STRUCTURE.
A function will do a deep copy, so I think the only problematic cases are
EXPR_ARRAY, and maybe EXPR_STRUCTURE.


[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-22 Thread ma...@linux-mips.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63175

--- Comment #5 from Maciej W. Rozycki  ---
But the point is not the missing string, but a missed optimisation.
Has the optimisation been brought back now?

NB I have no way to look into it anymore.


[Bug libstdc++/65165] missing std::promise::set_value_at_thread_exit

2015-02-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65165

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #2 from Jonathan Wakely  ---
Already fixed on trunk.

https://gcc.gnu.org/gcc-5/changes.html#libstdcxx


[Bug libstdc++/65165] missing std::promise::set_value_at_thread_exit

2015-02-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65165

--- Comment #3 from Jonathan Wakely  ---
It's also documented as missing in previous releases e.g.
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/libstdc++/manual/manual/status.html#status.iso.2011


[Bug libstdc++/61728] [4.10 regression] lost symbol FUNC:_ZNK10__cxxabiv117__pbase_type_info15__pointer_catchEPKS0_PPvj@@CXXABI_1.3

2015-02-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61728

--- Comment #4 from Jonathan Wakely  ---
Defining the function inline means that cxxabi.h depends on our implementation
details, which makes it incompatible with other implementations of the ABI
(libc++ uses our cxxabi.h but provides their own definitions of the public
interface).

Should this be reopened?


[Bug target/65032] [5 Regression] ICE in reload_combine_note_use, at postreload.c:1556 on i686-linux-gnu

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

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||vmakarov at gcc dot gnu.org

--- Comment #4 from Markus Trippelsdorf  ---
markus@x4 tmp % cat testc.ii
#pragma GCC visibility push(hidden)
#pragma GCC visibility push(default)
extern "C" {
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
}
enum class nsresult;
#pragma GCC visibility pop
class A
{
  float mRawPtr;

public:
  A (float *);
};
class B
{
public:
  B (int64_t, int, int);
};
typedef struct
{
  int channels;
} vorbis_info;
template  class C
{
public:
  typedef int size_type;
  size_type erase (_Key &);
};

template  class D
{
public:
  typedef _Key key_type;
  typedef C _Rep_type;
  _Rep_type _M_t;
  typename _Rep_type::size_type
  erase (key_type p1)
  {
return _M_t.erase (p1);
  }
};

class F
{
public:
  vorbis_info mInfo;
  D mVorbisPacketSamples;
  void ValidateVorbisPacketSamples (int *);
  int64_t Time (int64_t);
};
class G
{
  nsresult DecodeVorbis (int *);
  F *mVorbisState;
  int64_t mDecodedAudioFrames;
};
int fn1 (float ***);
void fn2 (int);
void
F::ValidateVorbisPacketSamples (int *p1)
{
  mVorbisPacketSamples.erase (p1);
}

nsresult
G::DecodeVorbis (int *p1)
{
  float **a;
  int b;
  long long c;
  while ((b = fn1 (&a)))
{
  mVorbisState->ValidateVorbisPacketSamples (p1);
  A (new float);
  for (; mVorbisState->mInfo.channels;)
{
}
  int64_t d = mVorbisState->Time (c - b);
  (B (d, b, mVorbisState->mInfo.channels));
  mDecodedAudioFrames -= b;
  fn2 (b);
}
}

markus@x4 tmp % g++ -c -m32 -Os -std=gnu++11 -fPIC -fstack-protector-strong
-fomit-frame-pointer testc.ii
testc.ii: In member function ‘nsresult G::DecodeVorbis(int*)’:
testc.ii:84:1: internal compiler error: in reload_combine_note_use, at
postreload.c:1556
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
markus@x4 tmp % /var/tmp/gcc_test/usr/local/bin/g++ -c -m32 -Os -std=gnu++11
-fPIC -fstack-protector-strong -fomit-frame-pointer testc.ii
testc.ii: In member function ‘nsresult G::DecodeVorbis(int*)’:
testc.ii:84:1: internal compiler error: in reload_combine_note_use, at
postreload.c:1556

[Bug c++/65157] Unable to define a static template member function of a nested class as a friend of a sibling class.

2015-02-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65157

--- Comment #1 from Jonathan Wakely  ---
Clang accepts the code, EDG rejects it with:

"x.cc", line 16: error: nontype "A::B::Create" is not a template
   friend void B::Create();
  ^


[Bug middle-end/65082] Wasted cycles when using a register based varible

2015-02-22 Thread NickParker at Eaton dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65082

--- Comment #3 from NickParker at Eaton dot com ---

register uint16_t r4 asm ("r4");
register uint16_t r6 asm ("r6");
volatile int8_t localOscCosine;
volatile int8_t acInput;

void pllExec(void)
{
  int16_t mix_output_s2=0;
  r4 += r6;
  localOscCosine = pgm_read_byte(&cosine7b[r4 >> 8]);
  mix_output_s2 = (localOscCosine * acInput); // GCC-AVR it give 16-bits
};


---
results in.


void pllExec(void)
  39:pll.c  {
  15   .loc 1 39 0
  16   .cfi_startproc
  17   /* prologue: function */
  18   /* frame size = 0 */
  19   /* stack size = 0 */
  20   .L__stack_usage = 0
  21   .LVL0:
  40:pll.c    //int16_t ss;
  41:pll.c    int16_t mix_output_s2=0;
  42:pll.c    r4 += r6;
  22   .loc 1 42 0
  23  F301  movw r30,r6
  24 0002 E40D  add r30,r4
  25 0004 F51D  adc r31,r5
  26 0006 2F01  movw r4,r30
  27   .LVL1:
  28   .LBB2:


[Bug middle-end/65082] Wasted cycles when using a register based varible

2015-02-22 Thread NickParker at Eaton dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65082

--- Comment #4 from NickParker at Eaton dot com ---
That was with 's' optimisation, and it does the sames for optimisation level
'1'.


[Bug target/63892] [5 Regression] gcc.dg/sibcall-3.c fails on darwin with -m32

2015-02-22 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63892

howarth at bromo dot med.uc.edu changed:

   What|Removed |Added

 CC||howarth at bromo dot med.uc.edu

--- Comment #21 from howarth at bromo dot med.uc.edu ---
(In reply to Iain Sandoe from comment #20)

This change seems to be regressing...

FAIL: gcc.dg/attr-noinline.c scan-assembler function_definition
FAIL: gcc.dg/attr-noinline.c scan-assembler function_declaration_both_before
FAIL: gcc.dg/attr-noinline.c scan-assembler function_declaration_both_after
FAIL: gcc.dg/attr-noinline.c scan-assembler
function_declaration_noinline_before
FAIL: gcc.dg/attr-noinline.c scan-assembler function_declaration_noinline_after
FAIL: gcc.dg/attr-noinline.c scan-assembler function_declaration_inline_before
FAIL: gcc.dg/attr-noinline.c scan-assembler
function_declaration_inline_noinline_before
FAIL: gcc.dg/attr-noinline.c scan-assembler
function_declaration_inline_noinline_after


[Bug target/61142] [SH] QImode/HImode @(R0,Rm),Rn does not load to Rn = R0

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

--- Comment #4 from Oleg Endo  ---
Created attachment 34839
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34839&action=edit
A set of peepholes

This is a set of peepholes I have accumulated, although untested.
With the patch CSiBE (-O2 -m4-single -mpretend-cmove) shows the following
summary:

sum:  3371887 -> 3367967-3920 / -0.116255 %
avg: -217.78 / -0.167780 %
max: replaypc-0.4.0.preproc   57212 -> 57188  -24 / -0.041949 %
min: mpeg2dec-0.3.1   54348 -> 53984 -364 / -0.669758 %


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

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

mrs at gcc dot gnu.org  changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||mrs at gcc dot gnu.org
   Severity|normal  |critical


[Bug target/65153] [SH][4.9 Regression] "insn does not satisfy its constraints" when compiling libmcrypt

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

--- Comment #9 from Oleg Endo  ---
(In reply to Oleg Endo from comment #8)
> 
> I've tried to disable the peephole on trunk and compared CSiBE results.  It
> seems the peephole doesn't hit very often:
> sum:  3371887 -> 3371943+56 / +0.001661 %
> 
> So we could probably remove the complex peephole without a big loss.
> 
> I have a set of similar but simpler peepholes with a higher hit rate.  Maybe
> we can replace the complex peephole with some simpler ones.

The set of peepholes can be found in PR 61142, attachment 34839.
CSiBE numbers with that patch:

sum:  3371887 -> 3367967-3920 / -0.116255 %
avg: -217.78 / -0.167780 %
max: replaypc-0.4.0.preproc   57212 -> 57188  -24 / -0.041949 %
min: mpeg2dec-0.3.1   54348 -> 53984 -364 / -0.669758 %

and with the patch, but without the problematic peephole of this PR:

sum:  3371887 -> 3367983-3904 / -0.115781 %
avg: -216.89 / -0.167686 %
max: replaypc-0.4.0.preproc   57212 -> 57188  -24 / -0.041949 %
min: mpeg2dec-0.3.1   54348 -> 53984 -364 / -0.669758 %

It seems that the other set of peepholes covers most of the cases of the
complex peephole.


[Bug target/63892] [5 Regression] gcc.dg/sibcall-3.c fails on darwin with -m32

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

--- Comment #22 from Iain Sandoe  ---
yeah, it's not right yet.. looking at this:
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index e1af8bf..3b5553e 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -658,13 +658,16 @@ sem_function::merge (sem_item *alias_item)
   create_thunk = !stdarg_p (TREE_TYPE (alias->decl));
   create_alias = false;
   /* When both alias and original are not overwritable, we can save
- the extra thunk wrapper for direct calls.  */
+ the extra thunk wrapper for direct calls (providing that there
+ are no other referring entries).  */
   redirect_callers
= (!original_discardable
   && !DECL_COMDAT_GROUP (alias->decl)
   && alias->get_availability () > AVAIL_INTERPOSABLE
   && original->get_availability () > AVAIL_INTERPOSABLE
-  && !alias->instrumented_version);
+  && !alias->instrumented_version
+  && alias->ref_list.referring.is_empty()
+ );
 }
   else
 {


[Bug target/65151] [SH][4.9 Regression] Internal compiler error when trying to build libav 11.2 on sh4

2015-02-22 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151

--- Comment #9 from Kazumoto Kojima  ---
(In reply to Oleg Endo from comment #8)
> I've also tried to see if the movrt pattern on SH2A has the same problem. 
> But the only thing that seems to trigger it is a movt.  The patch in c#7
> could also be applied to trunk, just in case.  But I'm not sure if we should
> do so, because on trunk the problem doesn't happen and I actually don't like
> the hunk for sh_hard_regno_mode_ok, as everything in the backend treats
> T_REG as SImode.
> Kaz, do you have any opinions?

I have no idea other than that.


[Bug target/65153] [SH][4.9 Regression] "insn does not satisfy its constraints" when compiling libmcrypt

2015-02-22 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65153

--- Comment #10 from Kazumoto Kojima  ---
The new peepholes are fine for trunk even in the stage4 but a bit
invasive to the release branch.  For 4.9 branch, I'd like to simply
remove the problematic peephole.


[Bug target/65153] [SH][4.9 Regression] "insn does not satisfy its constraints" when compiling libmcrypt

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

--- Comment #11 from Oleg Endo  ---
Sure.  I was actually referring to trunk all the time :)
I agree to remove the problematic peephole on 4.9 branch.


[Bug target/62109] __gthr_i486_lock_cmp_xchg missing clobber

2015-02-22 Thread gccbugzilla at limegreensocks dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62109

--- Comment #2 from David  ---
Attaching a patch was just the clearest way I knew to show the problem.

My hope was that posting it here would allow someone who knew how to submit
patches to take this the rest of the way.


[Bug target/65153] [SH][4.9 Regression] "insn does not satisfy its constraints" when compiling libmcrypt

2015-02-22 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65153

--- Comment #12 from Kazumoto Kojima  ---
Created attachment 34840
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34840&action=edit
patch for 4_9-branch

I've noticed that that peephole is the last user of sh.c:replace_n_hard_rtx.
I'm testing this and the similar patch for trunk on sh4-unknown-linux-gnu.


[Bug testsuite/65126] [5 Regression] additional_sources not defined anymore during dg-final

2015-02-22 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

vries at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||patch

--- Comment #8 from vries at gcc dot gnu.org ---
https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01350.html