[Bug fortran/63252] [5 Regression] tree_class_check_failed

2014-09-13 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63252

Tobias Burnus burnus at gcc dot gnu.org changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #1 from Tobias Burnus burnus at gcc dot gnu.org ---
Patch:

--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -3423,3 +3423,3 @@ gfc_build_builtin_function_decls (void)
get_identifier (PREFIX(caf_unlock)), R..WW,
-   void_type_node, 7, pvoid_type_node, size_type_node, integer_type_node,
+   void_type_node, 6, pvoid_type_node, size_type_node, integer_type_node,
pint_type, pchar_type_node, integer_type_node);


[Bug c++/60862] bad location in invalid conversion error

2014-09-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60862

--- Comment #3 from Marek Polacek mpolacek at gcc dot gnu.org ---
Author: mpolacek
Date: Sat Sep 13 07:54:40 2014
New Revision: 215235

URL: https://gcc.gnu.org/viewcvs?rev=215235root=gccview=rev
Log:
PR c++/60862
* parser.c (cp_parser_postfix_expression) case CPP_OPEN_PAREN: Set
location of a call expression.

* g++.dg/diagnostic/pr60862.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/diagnostic/pr60862.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/60862] bad location in invalid conversion error

2014-09-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60862

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

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

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


[Bug fortran/63252] [5 Regression] tree_class_check_failed

2014-09-13 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63252

--- Comment #2 from Tobias Burnus burnus at gcc dot gnu.org ---
Author: burnus
Date: Sat Sep 13 08:33:32 2014
New Revision: 215236

URL: https://gcc.gnu.org/viewcvs?rev=215236root=gccview=rev
Log:
2014-09-13  Tobias Burnus  bur...@net-b.de

PR fortran/63252
* trans-decl.c (gfc_build_builtin_function_decls): Fix
caf_unlock declaration.


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


[Bug fortran/63252] [5 Regression] tree_class_check_failed

2014-09-13 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63252

Tobias Burnus burnus at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Tobias Burnus burnus at gcc dot gnu.org ---
Should be FIXED. Thanks for the report


[Bug fortran/63252] [5 Regression] tree_class_check_failed

2014-09-13 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63252

Tobias Burnus burnus at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug c/63233] Missing Warray-bounds warning for array within struct

2014-09-13 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63233

--- Comment #6 from Mikael Pettersson mikpelinux at gmail dot com ---
(In reply to leis from comment #5)
 Fundamentally, what I'm really trying to do, is to have two arrays (of
 different types) in a fixed-sized struct. One array grows from the front,
 and one from the end. Dynamically I make sure that they do not overlap, but
 the sizes of the two arrays are not known statically. Is it really violating
 the standard?

Something like

union u {
  int a[50];
  char b[50 * sizeof int];
};

and accessing one array with incrementing indices and the other with
decrementing indices should work, if I understand your problem statement
correctly.  But this is now about programming not a gcc bug, so please use
gcc-help or some general C programming forum instead.


[Bug rtl-optimization/52773] internal error: in replace_pseudos_in, at reload1.c:577

2014-09-13 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52773

--- Comment #11 from Mikael Pettersson mikpelinux at gmail dot com ---
Probably just needs pinging.  FWIW I've had it in my 4.7 and 4.8 toolchains
(for all my targets) since last summer w/o issues.


[Bug tree-optimization/63255] New: [5.0 regression] FAIL: gcc.dg/lto/ipareference2 c_lto_ipareference2_0.o-c_lto_ipareference2_1.o execute -O1 -flto -flto-partition=1to1 -fwhole-program

2014-09-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63255

Bug ID: 63255
   Summary: [5.0 regression] FAIL: gcc.dg/lto/ipareference2
c_lto_ipareference2_0.o-c_lto_ipareference2_1.o
execute  -O1 -flto -flto-partition=1to1
-fwhole-program
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sch...@linux-m68k.org
CC: hubicka at gcc dot gnu.org
Target: powerpc64-*-*

$ gcc/xgcc -Bgcc/ -O1 -flto -flto-partition=1to1 -fwhole-program -c -m64 -o
c_lto_ipareference2_0.o ../gcc/gcc/testsuite/gcc.dg/lto/ipareference2_0.c
$ gcc/xgcc -Bgcc/ -O1 -flto -flto-partition=1to1 -fwhole-program -c -m64 -o
c_lto_ipareference2_1.o ../gcc/gcc/testsuite/gcc.dg/lto/ipareference2_1.c
$ gcc/xgcc -Bgcc/ c_lto_ipareference2_0.o c_lto_ipareference2_1.o -O1 -flto
-flto-partition=1to1 -fwhole-program -m64 -o gcc-dg-lto-ipareference2-01.exe
$ ./gcc-dg-lto-ipareference2-01.exe
Aborted
$ gdb ./gcc-dg-lto-ipareference2-01.exe 
GNU gdb (GDB) SUSE (7.5.1-0.7.29)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as ppc64-suse-linux.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from
/net/hawking/daten/src/gcc/regress/test/gcc-dg-lto-ipareference2-01.exe...done.
(gdb) r
Starting program:
/net/hawking/daten/src/gcc/regress/test/gcc-dg-lto-ipareference2-01.exe 

Program received signal SIGABRT, Aborted.
0x0fffb7e18f20 in .raise () from /lib64/power7/libc.so.6
(gdb) up
#1  0x0fffb7e1abe0 in .abort () from /lib64/power7/libc.so.6
(gdb) 
#2  0x1758 in .other_ltrans ()
(gdb) disass
Dump of assembler code for function .other_ltrans:
   0x1748 +0: mflrr0
   0x174c +4: std r0,16(r1)
   0x1750 +8: stdur1,-112(r1)
   0x1754 +12:bl  0x14d4
0012.plt_call.abort@@GLIBC_2.3+0
= 0x1758 +16:ld  r2,40(r1)
   0x175c +20:.long 0x0
   0x1760 +24:.long 0x1
   0x1764 +28:lwz r0,0(0)
End of assembler dump.

8640c57182f4279c2125915f1f3e4d4e7ebda7a4 is the first bad commit
commit 8640c57182f4279c2125915f1f3e4d4e7ebda7a4
Author: hubicka hubicka@138bc75d-0d04-0410-961f-82ee72b054a4
Date:   Thu Sep 11 06:48:23 2014 +

* varpool.c (varpool_node::ctor_useable_for_folding_p): Do not try
to access removed nodes.


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


[Bug target/52897] gcc 4.7.0 generates worse code than gcc 3.4.6 for m68000

2014-09-13 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52897

--- Comment #5 from Mikael Pettersson mikpelinux at gmail dot com ---
I'm afraid that improving performance on m68k is not a high priority for most
gcc developers.  Interested parties may have to do the work themselves, or hire
someone to do it for them.


[Bug target/61387] [5 Regression] ~900 test failures on on x86_64-apple-darwin13 for g++ with -m64 after r211089

2014-09-13 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61387

Francois-Xavier Coudert fxcoudert at gcc dot gnu.org changed:

   What|Removed |Added

 CC||fxcoudert at gcc dot gnu.org

--- Comment #12 from Francois-Xavier Coudert fxcoudert at gcc dot gnu.org ---
Also happens on darwin14.


[Bug target/63256] New: [5.0 regression] FAIL: gcc.dg/sms-8.c scan-rtl-dump-times sms SMS succeeded 0

2014-09-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63256

Bug ID: 63256
   Summary: [5.0 regression] FAIL: gcc.dg/sms-8.c
scan-rtl-dump-times sms SMS succeeded 0
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sch...@linux-m68k.org
CC: segher at kernel dot crashing.org
Target: powerpc-*-*

Only happens with -m32.

$ gcc/xgcc -Bgcc/ ../gcc/gcc/testsuite/gcc.dg/sms-8.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -fmodulo-sched
-fmodulo-sched-allow-regmoves -fdump-rtl-sms -ffat-lto-objects -lm -m32 -o
./sms-8.exe
$ grep SMS succeeded sms-8.c.214r.sms
../gcc/gcc/testsuite/gcc.dg/sms-8.c:18 SMS succeeded 12 2 (with ii, sc)

96f3c2b9903e92cf806719d18fc0682d617c0016 is the first bad commit
commit 96f3c2b9903e92cf806719d18fc0682d617c0016
Author: segher segher@138bc75d-0d04-0410-961f-82ee72b054a4
Date:   Tue Sep 2 11:21:09 2014 +

2014-09-02  Segher Boessenkool  seg...@kernel.crashing.org

* config/rs6000/rs6000.md (any_extend): New code iterator.
(u, su): New code attributes.
(dmode, DMODE): New mode attributes.
(sumulmode3_highpart): New.
(*sumulmode3_highpart): New.
(sumulsi3_highpart_le): New.
(sumuldi3_highpart_le): New.
(sumulsi3_highpart_64): New.
(umulmodedmode3): New.
(mulsidi3, umulsidi3, smulsi3_highpart, umulsi3_highpart, and two
splitters): Delete.
(mulditi3, umulditi3, smuldi3_highpart, umuldi3_highpart, and two
splitters): Delete.


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


[Bug debug/63257] New: FAIL: gnat.dg/specs/debug1.ads scan-assembler-times DW_AT_artificial 17

2014-09-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63257

Bug ID: 63257
   Summary: FAIL: gnat.dg/specs/debug1.ads scan-assembler-times
DW_AT_artificial 17
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sch...@linux-m68k.org
Target: powerpc64-*-*

Created attachment 33488
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33488action=edit
Assembler output

$ gcc/gnatmake --GCC=gcc/xgcc --GNATBIND=gcc/gnatbind --GNATLINK=gcc/gnatlink
-cargs -Bgcc -largs --GCC=gcc/xgcc -Bgcc  -m64 -margs
--RTS=powerpc64-linux/./libada -q -f ../gcc/testsuite/gnat.dg/specs/debug1.ads
-fno-diagnostics-show-caret -fdiagnostics-color=never -gdwarf-2 -cargs -dA
-margs -c -u -ffat-lto-objects -S -m64 -o debug1.s
$ grep -c DW_AT_artificial debug1.s 
16


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #4 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #2)
 However, building __divsc3 still fails for -m2 -mb, now with the
 following:
 
 beh 0 0 0
 (insn 1159 1008 1120 27 (set (reg:QI 625)
 (mem/c:QI (plus:SI (reg/f:SI 153 sfp)
 (const_int 19 [0x13])) [2 %sfp+-1 S1 A8])) sh_tmp.cpp:45 -1
  (nil))
 
 sh_tmp.cpp: In function '__divsc3':
 sh_tmp.cpp:57:1: internal compiler error: in lra_set_insn_recog_data, at
 lra.c:947
  }
  ^
 0x8524c29 lra_set_insn_recog_data(rtx_def*)
   ../../gcc-sh-lra/gcc/lra.c:947
 0x85258cb lra_get_insn_recog_data
   ../../gcc-sh-lra/gcc/lra-int.h:468
 0x85258cb lra_update_insn_regno_info
   ../../gcc-sh-lra/gcc/lra.c:1607
 0x85258cb lra_update_insn_regno_info
   ../../gcc-sh-lra/gcc/lra.c:1598
 0x8525b1b lra_push_insn_1
   ../../gcc-sh-lra/gcc/lra.c:1660
 0x8525b1b lra_push_insn(rtx_def*)
   ../../gcc-sh-lra/gcc/lra.c:1668
 0x8525d12 push_insns
   ../../gcc-sh-lra/gcc/lra.c:1711
 0x852618f lra_process_new_insns(rtx_def*, rtx_def*, rtx_def*, char const*)
   ../../gcc-sh-lra/gcc/lra.c:1756
 0x8533758 simplify_operand_subreg
   ../../gcc-sh-lra/gcc/lra-constraints.c:1523
 0x8533758 curr_insn_transform
   ../../gcc-sh-lra/gcc/lra-constraints.c:3258
 0x8535e2d lra_constraints(bool)
   ../../gcc-sh-lra/gcc/lra-constraints.c:4212
 0x8526af8 lra(_IO_FILE*)
   ../../gcc-sh-lra/gcc/lra.c:2198
 0x84e6823 do_reload
   ../../gcc-sh-lra/gcc/ira.c:5306
 0x84e6823 execute
   ../../gcc-sh-lra/gcc/ira.c:5465
 
 The generated insn 1159 isn't recognized, because the displacement value is
 out of range.

When compiling for -m2a-nofpu -mb the problem goes away because SH2A can handle
the displacement.  However, there are no QImode accesses in the resulting code
after LRA.

[Bug middle-end/61853] [4.9/5 Regression] ICE: SIGSEGV in store_field

2014-09-13 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61853

--- Comment #9 from John David Anglin danglin at gcc dot gnu.org ---
Introduced in r202592:

* tree-into-ssa.c (gate_into_ssa): New.
(pass_data_build_ssa): Use it.
* cgraph.h (expand_thunk): Update prototype.
* cgraphunit.c (analyze_function): Expand thunks early.
(expand_thunk): Fix DECL_CONTEXT of reust_decl;
build proper cgraph; set in_ssa_p; clear bogus TREE_ASM_WRITTEN;
set lowered flag; do not add new function.
(assemble_thunks_and_aliases): Update.
* tree-ssa.c (gate_init_datastructures): New gate.
(pass_data_init_datastructures): Use it.

PA bug fix in r202594 needs to be backported to r202592 to see this.


[Bug tree-optimization/63258] New: [5.0 regression] FAIL: gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c scan-tree-dump-times vect vectorization not profitable 1

2014-09-13 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63258

Bug ID: 63258
   Summary: [5.0 regression] FAIL:
gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c
scan-tree-dump-times vect vectorization not
profitable 1
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sch...@linux-m68k.org
CC: rguenther at suse dot de
Target: powerpc*-*-*

$ gcc/xgcc -Bgcc/
../gcc/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c -O2
-ftree-vectorize -fvect-cost-model=dynamic -fno-common -maltivec
-fdump-tree-vect-details -lm -m64 -o ./costmodel-slp-33.exe
$ grep -c vectorization not profitable costmodel-slp-33.c.116t.vect
0

192f7876fdb268b0b31a109123e0bb952a255a37 is the first bad commit
commit 192f7876fdb268b0b31a109123e0bb952a255a37
Author: rguenth rguenth@138bc75d-0d04-0410-961f-82ee72b054a4
Date:   Thu Aug 28 13:13:45 2014 +

2014-08-28  Richard Biener  rguent...@suse.de

PR tree-optimization/62283
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
Do not peel loops for alignment where the vector loop likely
doesn't run at least VF times.

* gfortran.dg/vect/pr62283.f: New testcase.
* gcc.dg/tree-ssa/cunroll-5.c: Adjust.
* gcc.dg/vect/costmodel/i386/costmodel-vect-31.c: Likewise.
* gcc.dg/vect/costmodel/i386/costmodel-vect-33.c: Likewise.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c: Likewise.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-33.c: Likewise.
* gcc.dg/vect/vect-33.c: Likewise.


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


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #5 from Oleg Endo olegendo at gcc dot gnu.org ---
Compiling the gcc.dg/atomic/c11-atomic-exec-4.c test case with '-O2 -m4 -ml
-matomic-model=soft-gusa' results in the following:

beh
(insn 207 206 208 6 (set (reg/f:SI 14 r14 [275])
(plus:SI (reg/f:SI 15 r15)
(const_int 36 [0x24]))) 76 {*addsi3_compact}
 (expr_list:REG_EQUIV (plus:SI (reg/f:SI 153 sfp)
(const_int -4 [0xfffc]))
(nil)))

internal compiler error: in check_rtl, at lra.c:1936
 TEST_FUNCS (complex_float_add, _Complex float, , += 1, 0, 2)
 ^
0x85416bf check_rtl
../../gcc-sh-lra/gcc/lra.c:1936
0x8544a9a lra(_IO_FILE*)
../../gcc-sh-lra/gcc/lra.c:2327
0x8500e43 do_reload
../../gcc-sh-lra/gcc/ira.c:5312
0x8500e43 execute
../../gcc-sh-lra/gcc/ira.c:5471


the addsi3_compact insn should have been split into two insns: 1x reg-reg-move
+ 1x add-insn.


[Bug fortran/56408] Fix dependency handling of testsuite/gfortran.dg

2014-09-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56408

Dominique d'Humieres dominiq at lps dot ens.fr changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-13
 Ever confirmed|0   |1

--- Comment #7 from Dominique d'Humieres dominiq at lps dot ens.fr ---
Related to the thread 

[PATCH] gcc parallel make check

especially https://gcc.gnu.org/ml/fortran/2014-09/msg00114.html.


[Bug target/58615] [SH] Optimize simple function returns

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58615

--- Comment #1 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #0)
 
 In cases where the prologue is trivial or consists of only a few
 instructions, it would be better to return from the function directly,
 instead of branching to  the returning basic block.

I meant epilogue, not prologue.


[Bug target/54699] [4.8/4.9/5 Regression] [SH] gfortran.dg/class_array_9.f03 ICEs

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54699

Oleg Endo olegendo at gcc dot gnu.org changed:

   What|Removed |Added

 Depends on||55212

--- Comment #12 from Oleg Endo olegendo at gcc dot gnu.org ---
This issue should be revisited after the switch to LRA.


[Bug target/52897] gcc 4.7.0 generates worse code than gcc 3.4.6 for m68000

2014-09-13 Thread fdarkangel at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52897

--- Comment #6 from fdarkangel at gmail dot com ---
I don't think hobbyist Sega Genesis devs are willing to hire gcc a hacker to
solve the issue. 
My bet is no one in the world with money is using m68k.

Why not drop m68k altogether then?

There's still hope for an m68k version of LLVM though.


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #6 from Oleg Endo olegendo at gcc dot gnu.org ---
Author: olegendo
Date: Sat Sep 13 16:23:55 2014
New Revision: 215240

URL: https://gcc.gnu.org/viewcvs?rev=215240root=gccview=rev
Log:
PR target/55212
* lra.c: fix comments.  print insn before lra_assert.

Modified:
branches/sh-lra/gcc/lra.c


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #7 from Oleg Endo olegendo at gcc dot gnu.org ---
An issue similar to that in c#5 has been reported here: 
https://gcc.gnu.org/ml/gcc/2014-04/msg00273.html

I've tried applying that patch, but it doesn't fix the issue in c#2 nor c#5.


[Bug rtl-optimization/63259] New: Detecting byteswap sequence

2014-09-13 Thread bisqwit at iki dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63259

Bug ID: 63259
   Summary: Detecting byteswap sequence
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bisqwit at iki dot fi

This is just silly. GCC optimizes the first function into single opcode
(bswap), but not the other. For Clang, it's the other way around.

unsigned byteswap_gcc(unsigned result)
{
result = ((result  0xu) 16) | ((result  0xu) 16);
result = ((result  0xFF00FF00u)  8) | ((result  0x00FF00FFu)  8);
return result;
}
unsigned byteswap_clang(unsigned result)
{
result = ((result  0xFF00FF00u)  8) | ((result  0x00FF00FFu)  8);
result = ((result  0xu) 16) | ((result  0xu) 16);
return result;
}

unsigned byteswap(unsigned v)
{
#ifdef __clang__
 return byteswap_clang(v);
#else
 return byteswap_gcc(v);
#endif
}

GCC output:

byteswap_gcc:
movl%edi, %eax
bswap   %eax
ret

byteswap_clang:
movl%edi, %eax
andl$-16711936, %eax
shrl$8, %eax
movl%eax, %edx
movl%edi, %eax
andl$16711935, %eax
sall$8, %eax
orl %edx, %eax
roll$16, %eax
ret

byteswap:
movl%edi, %eax
bswap   %eax
ret

Clang output:

byteswap_gcc:   # @byteswap_gcc
roll$16, %edi
movl%edi, %eax
shrl$8, %eax
andl$16711935, %eax # imm = 0xFF00FF
shll$8, %edi
andl$-16711936, %edi# imm = 0xFF00FF00
orl %eax, %edi
movl%edi, %eax
retq

byteswap_clang: # @byteswap_clang
bswapl  %edi
movl%edi, %eax
retq

byteswap:   # @byteswap
bswapl  %edi
movl%edi, %eax
retq


Tested both -m32 and -m64, with options: -Ofast -S
Tested versions:
- gcc (Debian 4.9.1-11) 4.9.1  Target: x86_64-linux-gnu
- Debian clang version 3.5.0-+rc1-2 (tags/RELEASE_35/rc1) (based on LLVM 3.5.0)
 Target: x86_64-pc-linux-gnu


[Bug middle-end/61853] [4.9/5 Regression] ICE: SIGSEGV in store_field

2014-09-13 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61853

--- Comment #10 from John David Anglin danglin at gcc dot gnu.org ---
Gimple from expand:

virtual ThePEG::Units::Energy
ThePEG::ConstituentParticleData::_ZTv0_n64_NK6TheP
EG23ConstituentParticleData15constituentMassEv() const (const struct
Constituent
ParticleData * const this)
{
  double SR.221;
  int (*Td579) () vcalloffset.173;
  int (*Td579) () * vtableaddr.172;
  struct Energy retval;
  sizetype _1;
  const struct ConstituentParticleData * _2;

;;   basic block 2, loop depth 0
;;pred:   ENTRY
  vtableaddr.172_5 = MEM[(int (*Td579) () * *)this_3(D)];
  vcalloffset.173_6 = MEM[(int (*Td579) () *)vtableaddr.172_5 + -64B];
  _1 = (sizetype) vcalloffset.173_6;
  _2 = this_3(D) + _1;
  # DEBUG this = _2
  SR.221_8 = MEM[(const struct ConstituentParticleData *)_2 + 8B];
  MEM[(struct Qty *)retval] = SR.221_8;
  return retval;
;;succ:   EXIT


[Bug target/51244] [SH] Inefficient conditional branch and code around T bit

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244

--- Comment #76 from Oleg Endo olegendo at gcc dot gnu.org ---
When compiling the libgcc divsc3 from PR 55212 with -O2 -m2 -ml (on sh-lra
branch) the following sequences are generated:

tst r0,r0
subcr0,r0 ! r0: T == 0 - 0x, T == 1 - 0x
not r0,r0 ! r0: T == 0 - 0x, T == 1 - 0x
and #1,r0 ! r0: T == 0 - 1, T == 1 - 0

which can be done better as:

tst r0,r0
mov #-1,r0
negcr0,r0

or
tst r0,r0
movtr0
xor #1,r0

and on SH2A:

tst r0,r0
movrt   r0


combine is looking for the following patterns:

Failed to match this instruction:
(set (reg:SI 296 [ D.1371 ])
(and:SI (not:SI (reg:SI 147 t))
(const_int 1 [0x1])))

Failed to match this instruction:
(set (reg:SI 147 t)
(and:SI (reg:SI 147 t)
(const_int 1 [0x1])))

(and:SI (reg:SI T_REG) (const_int 1)) is effectively a T - T nop move which is
supposed to be handled by the *movtt insn.  Maybe the case above and the
original eq:SI case in *movtt should be added to the t_reg_operand predicate.
 Then the *movtt pattern could be simplified to:

(define_insn_and_split *movtt
  [(set (reg:SI T_REG) (match_operand 0 t_reg_operand))] ...


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #8 from Oleg Endo olegendo at gcc dot gnu.org ---
Author: olegendo
Date: Sat Sep 13 18:53:54 2014
New Revision: 215241

URL: https://gcc.gnu.org/viewcvs?rev=215241root=gccview=rev
Log:
PR target/55212
* predicates.md (general_movsrc_operand,  general_movdst_operand):
  Don't legitimate QI/HImode  mem displacement while LRA is running.

Modified:
branches/sh-lra/gcc/config/sh/predicates.md


[Bug bootstrap/63253] boot strap failure due to ODR warnings

2014-09-13 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63253

--- Comment #2 from Andi Kleen andi-gcc at firstfloor dot org ---
I still need to revert this commit to be able to bootstrap. With that it works.

commit d585ba22a6b4250b0d819d3d7da72f7dd37e2981
Author: hubicka hubicka@138bc75d-0d04-0410-961f-82ee72b054a4
Date:   Thu Sep 11 23:16:42 2014 +

* common.opt (flto-odr-type-merging): New flag.
* ipa-deivrt.c (hash_type_name): Use ODR names for hasing if availale.
(types_same_for_odr): Likewise.
(odr_subtypes_equivalent_p): Likewise.
(add_type_duplicate): Do not walk type variants.
(register_odr_type): New function.
* ipa-utils.h (register_odr_type): Declare.
(odr_type_p): New function.
* langhooks.c (lhd_set_decl_assembler_name): Do


[Bug middle-end/63244] [4.9 regression] internal compiler error: Segmentation fault (program cc1plus)

2014-09-13 Thread nheghathivhistha at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63244

--- Comment #8 from David Kredba nheghathivhistha at gmail dot com ---
I tried gdb and follow-fork-mode child and bt is repeating below for me.

-cut-
#101591 0x00e99a17 in d_print_comp (dpi=dpi@entry=0x7fff9200,
options=options@entry=0, dc=optimized out)
at
/var/tmp/portage/sys-devel/gcc-4.9.2_alpha20140911/work/gcc-4.9-20140911/libiberty/cp-demangle.c:4517
#101592 0x00e9c618 in d_print_cast (dpi=dpi@entry=0x7fff9200,
options=options@entry=0, dc=0x7fff9d90)
at
/var/tmp/portage/sys-devel/gcc-4.9.2_alpha20140911/work/gcc-4.9-20140911/libiberty/cp-demangle.c:5700
#101593 0x00e9a623 in d_print_comp (dpi=dpi@entry=0x7fff9200,
options=options@entry=0, dc=dc@entry=0x7fff9d90)
at
/var/tmp/portage/sys-devel/gcc-4.9.2_alpha20140911/work/gcc-4.9-20140911/libiberty/cp-demangle.c:4967
#101594 0x00e9a278 in d_print_comp (dpi=dpi@entry=0x7fff9200,
options=options@entry=0, dc=optimized out)
at
/var/tmp/portage/sys-devel/gcc-4.9.2_alpha20140911/work/gcc-4.9-20140911/libiberty/cp-demangle.c:4326
-cut-


[Bug middle-end/61853] [4.9/5 Regression] ICE: SIGSEGV in store_field

2014-09-13 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61853

--- Comment #11 from John David Anglin danglin at gcc dot gnu.org ---
This is probably a bug in pa_function_value.  Nominally, we return
5 to 8 byte aggregate values in a BLKmode because of the odd right
justification of the object.  However in this case, we have a DFmode
aggregate and treating it as BLKmode causes the ICE.


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #9 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #8)
 Author: olegendo
 Date: Sat Sep 13 18:53:54 2014
 New Revision: 215241
 
 URL: https://gcc.gnu.org/viewcvs?rev=215241root=gccview=rev
 Log:
 PR target/55212
 * predicates.md (general_movsrc_operand,  general_movdst_operand):
   Don't legitimate QI/HImode  mem displacement while LRA is running.
 
 Modified:
 branches/sh-lra/gcc/config/sh/predicates.md

libgcc now seems to compile for all default multilibs defined for sh-elf.

The next failure is:

gcc-sh-lra-build-sh-elf/sh-elf/libstdc++-v3/include/bits/locale_facets_nonio.h:1564:66:
internal compiler error: in set_address_disp, at rtlanal.c:5790
   { return this-do_put(__s, __intl, __io, __fill, __units); }
  ^
0x8830497 set_address_disp
../../gcc-sh-lra/gcc/rtlanal.c:5790
0x8830497 set_address_disp
../../gcc-sh-lra/gcc/rtlanal.c:6080
0x8830497 decompose_normal_address
../../gcc-sh-lra/gcc/rtlanal.c:5912
0x8830497 decompose_address
../../gcc-sh-lra/gcc/rtlanal.c:5997
0x88305b1 decompose_mem_address(address_info*, rtx_def*)
../../gcc-sh-lra/gcc/rtlanal.c:6017
0x8745d7b process_address_1
../../gcc-sh-lra/gcc/lra-constraints.c:2783
0x874aed9 process_address
../../gcc-sh-lra/gcc/lra-constraints.c:2990
0x874aed9 curr_insn_transform
../../gcc-sh-lra/gcc/lra-constraints.c:3274
0x874d905 lra_constraints(bool)
../../gcc-sh-lra/gcc/lra-constraints.c:4215
0x873ce6c lra(_IO_FILE*)
../../gcc-sh-lra/gcc/lra.c:2206
0x86f99a3 do_reload
../../gcc-sh-lra/gcc/ira.c:5312
0x86f99a3 execute
../../gcc-sh-lra/gcc/ira.c:5471


[Bug bootstrap/63253] boot strap failure due to ODR warnings

2014-09-13 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63253

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 CC||trippels at gcc dot gnu.org

--- Comment #3 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
(In reply to Andi Kleen from comment #2)
 I still need to revert this commit to be able to bootstrap. With that it
 works.

Or just use --disable-werror for now.


[Bug bootstrap/63235] building fails with --disable-bootstrap

2014-09-13 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63235

--- Comment #11 from Andi Kleen andi-gcc at firstfloor dot org ---
Actually I now get similar errors when doing a standard (LTO) boot strap and
running the test suite. Several tests in the test suite fail with the same ICE.

That's surprising, I thought the test suite is done with stage2, so the host
compiler should not impact it?

/home/andi/gcc/git/gcc/gcc/testsuite/g++.dg/ext/mv1.C: In function 'int
main()':
/home/andi/gcc/git/gcc/gcc/testsuite/g++.dg/ext/mv1.C:40:33: internal compiler
error: tree check: expected tree_list, have var_decl in get_attribute_name, at
attribs.c:679
0xe2f55b tree_check_failed(tree_node const*, char const*, int, char const*,
...)
/home/andi/gcc/git/gcc/gcc/tree.c:9166
0xdb8431 tree_check(tree_node const*, char const*, int, char const*, tree_code)



These all fail with the same ICE:

FAIL: gcc.target/i386/builtin_target.c (internal compiler error)
FAIL: gcc.target/i386/builtin_target.c (test for excess errors)
WARNING: gcc.target/i386/builtin_target.c compilation failed to produce
executable

FAIL: g++.dg/ext/mv1.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/ext/mv1.C  -std=gnu++98 (test for excess errors)
WARNING: g++.dg/ext/mv1.C  -std=gnu++98 compilation failed to produce
executable
FAIL: g++.dg/ext/mv1.C  -std=gnu++11 (internal compiler error)
FAIL: g++.dg/ext/mv1.C  -std=gnu++11 (test for excess errors)
WARNING: g++.dg/ext/mv1.C  -std=gnu++11 compilation failed to produce
executable
FAIL: g++.dg/ext/mv1.C  -std=gnu++1y (internal compiler error)
FAIL: g++.dg/ext/mv1.C  -std=gnu++1y (test for excess errors)
WARNING: g++.dg/ext/mv1.C  -std=gnu++1y compilation failed to produce
executable
FAIL: g++.dg/ext/mv12.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/ext/mv12.C  -std=gnu++98 (test for excess errors)
WARNING: g++.dg/ext/mv12.C  -std=gnu++98 compilation failed to produce
executable
FAIL: g++.dg/ext/mv12.C  -std=gnu++11 (internal compiler error)
FAIL: g++.dg/ext/mv12.C  -std=gnu++11 (test for excess errors)
WARNING: g++.dg/ext/mv12.C  -std=gnu++11 compilation failed to produce
executable
FAIL: g++.dg/ext/mv12.C  -std=gnu++1y (internal compiler error)
FAIL: g++.dg/ext/mv12.C  -std=gnu++1y (test for excess errors)
WARNING: g++.dg/ext/mv12.C  -std=gnu++1y compilation failed to produce
executable
FAIL: g++.dg/ext/mv14.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/ext/mv14.C  -std=gnu++98 (test for excess errors)
WARNING: g++.dg/ext/mv14.C  -std=gnu++98 compilation failed to produce
executable
FAIL: g++.dg/ext/mv14.C  -std=gnu++11 (internal compiler error)
FAIL: g++.dg/ext/mv14.C  -std=gnu++11 (test for excess errors)
WARNING: g++.dg/ext/mv14.C  -std=gnu++11 compilation failed to produce
executable
FAIL: g++.dg/ext/mv14.C  -std=gnu++1y (internal compiler error)
FAIL: g++.dg/ext/mv14.C  -std=gnu++1y (test for excess errors)
WARNING: g++.dg/ext/mv14.C  -std=gnu++1y compilation failed to produce
executable
FAIL: g++.dg/ext/mv15.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/ext/mv15.C  -std=gnu++98 (test for excess errors)
WARNING: g++.dg/ext/mv15.C  -std=gnu++98 compilation failed to produce
executable
FAIL: g++.dg/ext/mv15.C  -std=gnu++11 (internal compiler error)
FAIL: g++.dg/ext/mv15.C  -std=gnu++11 (test for excess errors)
WARNING: g++.dg/ext/mv15.C  -std=gnu++11 compilation failed to produce
executable
FAIL: g++.dg/ext/mv15.C  -std=gnu++1y (internal compiler error)
FAIL: g++.dg/ext/mv15.C  -std=gnu++1y (test for excess errors)
WARNING: g++.dg/ext/mv15.C  -std=gnu++1y compilation failed to produce
executable
FAIL: g++.dg/ext/mv16.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/ext/mv16.C  -std=gnu++98 (test for excess errors)
WARNING: g++.dg/ext/mv16.C  -std=gnu++98 compilation failed to produce
executable
FAIL: g++.dg/ext/mv16.C  -std=gnu++11 (internal compiler error)
FAIL: g++.dg/ext/mv16.C  -std=gnu++11 (test for excess errors)
WARNING: g++.dg/ext/mv16.C  -std=gnu++11 compilation failed to produce
executable
FAIL: g++.dg/ext/mv16.C  -std=gnu++1y (internal compiler error)
FAIL: g++.dg/ext/mv16.C  -std=gnu++1y (test for excess errors)
WARNING: g++.dg/ext/mv16.C  -std=gnu++1y compilation failed to produce
executable
FAIL: g++.dg/ext/mv2.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/ext/mv2.C  -std=gnu++98 (test for excess errors)
WARNING: g++.dg/ext/mv2.C  -std=gnu++98 compilation failed to produce
executable
FAIL: g++.dg/ext/mv5.C  -std=gnu++11 (test for excess errors)
WARNING: g++.dg/ext/mv5.C  -std=gnu++11 compilation failed to produce
executable
FAIL: g++.dg/ext/mv5.C  -std=gnu++1y (internal compiler error)
FAIL: g++.dg/ext/mv5.C  -std=gnu++1y (test for excess errors)
WARNING: g++.dg/ext/mv5.C  -std=gnu++1y compilation failed to produce
executable
FAIL: g++.dg/ext/mv6.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/ext/mv6.C  -std=gnu++98 (test for excess errors)
WARNING: g++.dg/ext/mv6.C  -std=gnu++98 compilation failed to produce
executable
FAIL: 

[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #10 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #9)
  
 The next failure is:
 
 gcc-sh-lra-build-sh-elf/sh-elf/libstdc++-v3/include/bits/locale_facets_nonio.
 h:1564:66: internal compiler error: in set_address_disp, at rtlanal.c:5790
{ return this-do_put(__s, __intl, __io, __fill, __units); }
   ^
 0x8830497 set_address_disp
   ../../gcc-sh-lra/gcc/rtlanal.c:5790
 0x8830497 set_address_disp
   ../../gcc-sh-lra/gcc/rtlanal.c:6080
 0x8830497 decompose_normal_address
   ../../gcc-sh-lra/gcc/rtlanal.c:5912
 0x8830497 decompose_address
   ../../gcc-sh-lra/gcc/rtlanal.c:5997
 0x88305b1 decompose_mem_address(address_info*, rtx_def*)
   ../../gcc-sh-lra/gcc/rtlanal.c:6017
 0x8745d7b process_address_1
   ../../gcc-sh-lra/gcc/lra-constraints.c:2783
 0x874aed9 process_address
   ../../gcc-sh-lra/gcc/lra-constraints.c:2990
 0x874aed9 curr_insn_transform
   ../../gcc-sh-lra/gcc/lra-constraints.c:3274
 0x874d905 lra_constraints(bool)
   ../../gcc-sh-lra/gcc/lra-constraints.c:4215
 0x873ce6c lra(_IO_FILE*)
   ../../gcc-sh-lra/gcc/lra.c:2206
 0x86f99a3 do_reload
   ../../gcc-sh-lra/gcc/ira.c:5312
 0x86f99a3 execute
   ../../gcc-sh-lra/gcc/ira.c:5471


This is due to the following invalid mem that ends up in the
*extendmodesi2_compact_snd pattern:

(insn 8 5 10 2 (set (reg/v:SI 171 [ __fill ])
(sign_extend:SI (mem/c:QI (plus:SI (plus:SI (reg/f:SI 145 ap)
(const_int 12 [0xc]))
(const_int 4 [0x4])) [0 __fill+0 S1 A32])))
locale_facets_nonio.h:1562 241 {*extendqisi2_compact_snd}
 (expr_list:REG_EQUIV (mem:SI (plus:SI (reg/f:SI 15 r15)
(const_int 4 [0x4])) [0  S4 A32])
(nil)))


in function decompose_address:
inner = (plus:SI (plus:SI (reg/f:SI 145 ap)
(const_int 12 [0xc]))
(const_int 4 [0x4]))

[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #11 from Oleg Endo olegendo at gcc dot gnu.org ---
Author: olegendo
Date: Sat Sep 13 20:21:00 2014
New Revision: 215243

URL: https://gcc.gnu.org/viewcvs?rev=215243root=gccview=rev
Log:
PR target/55212
* predicates.md (general_movsrc_operand,  general_movdst_operand):
  Allow only valid plus address expressions.

Modified:
branches/sh-lra/gcc/config/sh/predicates.md


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #12 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #11)
 Author: olegendo
 Date: Sat Sep 13 20:21:00 2014
 New Revision: 215243
 
 URL: https://gcc.gnu.org/viewcvs?rev=215243root=gccview=rev
 Log:
 PR target/55212
 * predicates.md (general_movsrc_operand,  general_movdst_operand):
   Allow only valid plus address expressions.
 
 Modified:
 branches/sh-lra/gcc/config/sh/predicates.md

After that, we're back to:

beh
(insn 189 188 1583 22 (set (reg/f:SI 14 r14 [561])
(plus:SI (reg/f:SI 15 r15)
(const_int 28 [0x1c]))) locale_facets_nonio.h:1195 76
{*addsi3_compact}
 (expr_list:REG_EQUAL (plus:SI (reg/f:SI 153 sfp)
(const_int -36 [0xffdc]))
(nil)))

locale_facets_nonio.tcc:125:5: internal compiler error: in check_rtl, at
lra.c:1935

0x873a21f check_rtl
../../gcc-sh-lra/gcc/lra.c:1935
0x873d5fa lra(_IO_FILE*)
../../gcc-sh-lra/gcc/lra.c:2326
0x86f99a3 do_reload
../../gcc-sh-lra/gcc/ira.c:5312
0x86f99a3 execute
../../gcc-sh-lra/gcc/ira.c:5471

... which seems to be the same issue as in c#5


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #13 from Oleg Endo olegendo at gcc dot gnu.org ---
Author: olegendo
Date: Sat Sep 13 20:40:21 2014
New Revision: 215244

URL: https://gcc.gnu.org/viewcvs?rev=215244root=gccview=rev
Log:
PR target/55212
* Remove LEGITIMIZE_RELOAD_ADDRESS and sh_legitimize_reload_address.
  They are not used by LRA.

Modified:
branches/sh-lra/gcc/config/sh/sh-protos.h
branches/sh-lra/gcc/config/sh/sh.c
branches/sh-lra/gcc/config/sh/sh.h


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #14 from Oleg Endo olegendo at gcc dot gnu.org ---
Author: olegendo
Date: Sat Sep 13 21:32:27 2014
New Revision: 215246

URL: https://gcc.gnu.org/viewcvs?rev=215246root=gccview=rev
Log:
PR target/55212
* Apply patch from https://gcc.gnu.org/ml/gcc/2014-04/msg00273.html

Modified:
branches/sh-lra/gcc/lra-constraints.c


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #15 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #14)
 Author: olegendo
 Date: Sat Sep 13 21:32:27 2014
 New Revision: 215246
 
 URL: https://gcc.gnu.org/viewcvs?rev=215246root=gccview=rev
 Log:
 PR target/55212
 * Apply patch from https://gcc.gnu.org/ml/gcc/2014-04/msg00273.html
 
 Modified:
 branches/sh-lra/gcc/lra-constraints.c

Now the build 'make all' for sh-elf c,c++ completes without errors.

New problem:
Compiling newlib 1.20.0 with '-O2 -m2e':

./../../../../../newlib-1.20.0/newlib/libm/math/er_lgamma.c: In function
'__ieee754_lgamma_r':
../../../../../../newlib-1.20.0/newlib/libm/math/er_lgamma.c:309:1: internal
compiler error: Max. number of generated reload insns per insn is achieved (90)

 }
 ^
0x85551c5 lra_constraints(bool)
../../gcc-sh-lra/gcc/lra-constraints.c:4145
0x85442bc lra(_IO_FILE*)
../../gcc-sh-lra/gcc/lra.c:2206
0x8500df3 do_reload
../../gcc-sh-lra/gcc/ira.c:5312
0x8500df3 execute
../../gcc-sh-lra/gcc/ira.c:5471
Please submit a full bug report,


[Bug target/63256] [5.0 regression] FAIL: gcc.dg/sms-8.c scan-rtl-dump-times sms SMS succeeded 0

2014-09-13 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63256

Segher Boessenkool segher at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-13
 CC||segher at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Segher Boessenkool segher at gcc dot gnu.org ---
Yes.  The patch submission already mentioned this.

The SMS testcases need some maintenance (not just this one).


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #16 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #5)
 Compiling the gcc.dg/atomic/c11-atomic-exec-4.c test case with '-O2 -m4 -ml
 -matomic-model=soft-gusa' results in the following:
 

This problem seems to be gone now, too.


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #17 from Oleg Endo olegendo at gcc dot gnu.org ---
Author: olegendo
Date: Sat Sep 13 22:13:56 2014
New Revision: 215247

URL: https://gcc.gnu.org/viewcvs?rev=215247root=gccview=rev
Log:
PR target/55212
* lra-constraints.c: Print insn when hitting MAX_RELOAD_INSNS_NUMBER.

Modified:
branches/sh-lra/gcc/lra-constraints.c


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #18 from Oleg Endo olegendo at gcc dot gnu.org ---
Created attachment 33489
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33489action=edit
Reduced case for MAX_RELOAD_INSNS_NUMBER

This fails when compiling with -O2 -m2e -m{l|b} with:

curr_insn = (insn 713 115 712 16 (parallel [
(set (reg/v:SF 804 [orig:333 x ] [333])
(reg/v:SF 714 [orig:333 x ] [333]))
(use (reg/v:PSI 151 ))
(clobber (scratch:SI))
]) er_lgamma.c:85 296 {movsf_ie}
 (nil))

In file included from sh_tmp.cpp:4:0:
er_lgamma.c: In function '__ieee754_lgamma_r':
er_lgamma.c:151:1: internal compiler error: Max. number of generated reload
insns per insn is achieved (90)

 }
 ^
0x8555215 lra_constraints(bool)
../../gcc-sh-lra/gcc/lra-constraints.c:4149
0x85442bc lra(_IO_FILE*)
../../gcc-sh-lra/gcc/lra.c:2206
0x8500df3 do_reload
../../gcc-sh-lra/gcc/ira.c:5312
0x8500df3 execute
../../gcc-sh-lra/gcc/ira.c:5471


[Bug target/63260] New: [SH] fabs, fneg do not need fp-mode setting and do not use fpscr

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63260

Bug ID: 63260
   Summary: [SH] fabs, fneg do not need fp-mode setting and do not
use fpscr
   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*-*-*

Created attachment 33490
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33490action=edit
Proposed patch

The fabs and fneg insns do not require an FPSCR.PR or FPSCR.SZ mode setting as
they operate on the high part of a double register pair.  Thus they are the
same for single and double precision


[Bug target/55212] [SH] Switch from IRA to LRA

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #19 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #18)
 Created attachment 33489 [details]
 Reduced case for MAX_RELOAD_INSNS_NUMBER
 
 This fails when compiling with -O2 -m2e -m{l|b} with:
 
 curr_insn = (insn 713 115 712 16 (parallel [
 (set (reg/v:SF 804 [orig:333 x ] [333])
 (reg/v:SF 714 [orig:333 x ] [333]))
 (use (reg/v:PSI 151 ))
 (clobber (scratch:SI))
 ]) er_lgamma.c:85 296 {movsf_ie}
  (nil))

It's a reload loop and is maybe similar to PR 57032.


[Bug rtl-optimization/57032] [4.9/5 Regression]: internal compiler error: Max. number of generated reload insns per insn is achieved (90)

2014-09-13 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57032

Oleg Endo olegendo at gcc dot gnu.org changed:

   What|Removed |Added

 CC||olegendo at gcc dot gnu.org

--- Comment #6 from Oleg Endo olegendo at gcc dot gnu.org ---
While trying to switch SH to LRA (PR 55212) I ran into something that looks
similar.