[Bug fortran/54465] New: Implement -Wextra for Fortran

2012-09-02 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54465

 Bug #: 54465
   Summary: Implement -Wextra for Fortran
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: enhancement
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: tkoe...@gcc.gnu.org


It would be nice to define some Fortran warnings under -Wextra.
(Just to keep track of this).

Initial patch:

http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00022.html


[Bug fortran/37336] Fortran 2003: Finish derived-type finalization

2012-09-02 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336

--- Comment #11 from Tobias Burnus  2012-09-03 
06:36:05 UTC ---
Author: burnus
Date: Mon Sep  3 06:35:59 2012
New Revision: 190869

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190869
Log:
2012-09-03  Alessandro Fanfarillo  
Tobias Burnus  

PR fortran/37336
* gfortran.h (symbol_attribute): Add artificial.
* module.c (mio_symbol_attribute): Handle attr.artificial
* class.c (gfc_build_class_symbol): Defer creation of the vtab
if the DT has finalizers, mark generated symbols as
attr.artificial.
(has_finalizer_component, finalize_component,
finalization_scalarizer, generate_finalization_wrapper):
New static functions.
(gfc_find_derived_vtab): Add _final component and call
generate_finalization_wrapper.
* dump-parse-tree.c (show_f2k_derived): Use resolved
proc_tree->n.sym rather than unresolved proc_sym.
(show_attr): Handle attr.artificial.
* resolve.c (gfc_resolve_finalizers): Ensure that the vtab
* exists.
(resolve_fl_derived): Resolve finalizers before
generating the vtab.
(resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS;
skip artificial symbols.
(resolve_fl_derived0): Skip artificial symbols.

2012-09-03  Tobias Burnus  

PR fortran/51632
* gfortran.dg/coarray_class_1.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray_class_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/class.c
trunk/gcc/fortran/dump-parse-tree.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/module.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/51632] [OOP] Bogus argument checking for generated _def_init parameter and _copy procedure with CAF

2012-09-02 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51632

--- Comment #2 from Tobias Burnus  2012-09-03 
06:36:05 UTC ---
Author: burnus
Date: Mon Sep  3 06:35:59 2012
New Revision: 190869

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190869
Log:
2012-09-03  Alessandro Fanfarillo  
Tobias Burnus  

PR fortran/37336
* gfortran.h (symbol_attribute): Add artificial.
* module.c (mio_symbol_attribute): Handle attr.artificial
* class.c (gfc_build_class_symbol): Defer creation of the vtab
if the DT has finalizers, mark generated symbols as
attr.artificial.
(has_finalizer_component, finalize_component,
finalization_scalarizer, generate_finalization_wrapper):
New static functions.
(gfc_find_derived_vtab): Add _final component and call
generate_finalization_wrapper.
* dump-parse-tree.c (show_f2k_derived): Use resolved
proc_tree->n.sym rather than unresolved proc_sym.
(show_attr): Handle attr.artificial.
* resolve.c (gfc_resolve_finalizers): Ensure that the vtab
* exists.
(resolve_fl_derived): Resolve finalizers before
generating the vtab.
(resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS;
skip artificial symbols.
(resolve_fl_derived0): Skip artificial symbols.

2012-09-03  Tobias Burnus  

PR fortran/51632
* gfortran.dg/coarray_class_1.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray_class_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/class.c
trunk/gcc/fortran/dump-parse-tree.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/module.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog


[Bug bootstrap/54415] GCC 4.4.4 build fails on solaris sparc with error as undefined reference to `_Qp_xtoq'

2012-09-02 Thread birender.singh at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54415

--- Comment #3 from birender.singh at hotmail dot com 2012-09-03 06:34:53 UTC 
---
The gcc used as below:
bash-3.2# gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with:
/sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)


I set  env CC="gcc -m64" And again executed the configure command as below, but
it fails.

../gcc-4.4.4/configure  --prefix=/usr/local/gcc-4.4.4_64
--with-gmp=/els/install/gcc-4.4.4_64/gmp32
--with-mpfr=/els/install/gcc-4.4.4_64/mpfr32 --build=sparcv9-sun-solaris2.10
--enable-languages=c,c++ --with-gnu-as --with-gnu-ld


Fails with below error messages:

.
.
.
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_bswapdi2_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunssfsi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunsdfsi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunsxfsi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixsfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixdfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixxfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixtfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunssfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunsdfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunsxfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunstfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatdisf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatdidf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatdixf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatditf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatundisf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatundidf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatundixf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatunditf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_divdi3_s.o' is incompatible with
sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_moddi3_s.o' is incompatible with
sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc

[Bug bootstrap/54415] GCC 4.4.4 build fails on solaris sparc with error as undefined reference to `_Qp_xtoq'

2012-09-02 Thread birender.singh at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54415

birender.singh at hotmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|WORKSFORME  |

--- Comment #2 from birender.singh at hotmail dot com 2012-09-03 06:30:59 UTC 
---
The gcc used as below:
bash-3.2# gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with:
/sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)


I set  env CC="gcc -m64" And again executed the configure command as below, but
it fails.

../gcc-4.4.4/configure  --prefix=/usr/local/gcc-4.4.4_64
--with-gmp=/els/install/gcc-4.4.4_64/gmp32
--with-mpfr=/els/install/gcc-4.4.4_64/mpfr32 --build=sparcv9-sun-solaris2.10
--enable-languages=c,c++ --with-gnu-as --with-gnu-ld


Fails with below error messages:

.
.
.
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_bswapdi2_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunssfsi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunsdfsi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunsxfsi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixsfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixdfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixxfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixtfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunssfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunsdfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunsxfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_fixunstfdi_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatdisf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatdidf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatdixf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatditf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatundisf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatundidf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatundixf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_floatunditf_s.o' is incompatible
with sparc output
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/bin/ld:
warning: sparc:v9 architecture of input file `_

[Bug fortran/54463] -fdefault-real-8 does not promote the BLAS call when using -fexternal-blas

2012-09-02 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54463

Tobias Burnus  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org
   Severity|enhancement |normal

--- Comment #2 from Tobias Burnus  2012-09-03 
06:14:22 UTC ---
The following should work. I am not too kind to have magic numbers, maybe that
part could be improved.

--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -2364,4 +2364,3 @@ gfc_conv_intrinsic_funcall (gfc_se * se, gfc_expr * expr)
  && (sym->ts.type == BT_REAL || sym->ts.type == BT_COMPLEX)
- && (sym->ts.kind == gfc_default_real_kind
- || sym->ts.kind == gfc_default_double_kind))
+ && (sym->ts.kind == 4 || sym->ts.kind == 8))
{
@@ -2371,3 +2370,3 @@ gfc_conv_intrinsic_funcall (gfc_se * se, gfc_expr * expr)
{
- if (sym->ts.kind == gfc_default_real_kind)
+ if (sym->ts.kind == 4)
gemm_fndecl = gfor_fndecl_sgemm;
@@ -2378,3 +2377,3 @@ gfc_conv_intrinsic_funcall (gfc_se * se, gfc_expr * expr)
{
- if (sym->ts.kind == gfc_default_real_kind)
+ if (sym->ts.kind == 4)
gemm_fndecl = gfor_fndecl_cgemm;


[Bug bootstrap/54453] [4.8 Regression] r190783 breaks bootstrap on powerpc64-unknown-linux-gnu

2012-09-02 Thread dougmencken at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54453

--- Comment #5 from Douglas Mencken  2012-09-03 
02:12:01 UTC ---
Successfully bootstrapped with ``Revert a few Makefile.am regexps'' patch.


[Bug fortran/54463] -fdefault-real-8 does not promote the BLAS call when using -fexternal-blas

2012-09-02 Thread kargl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54463

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org
   Severity|normal  |enhancement

--- Comment #1 from kargl at gcc dot gnu.org 2012-09-02 23:46:30 UTC ---
This bug report should be closed.  Combining
-fexternal-blas and -fdefault-real-8 would 
add needless complexity to the compiler.
The correct solution is to write proper Fortran
code.  To be even more specific, don't use 
-fdefault-real-8.  It was a really, really,
bad idea and was only supplied to give
backwards compatibility with g77.


[Bug debug/54460] FAIL: g++.dg/debug/dwarf2/nested-3.C

2012-09-02 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54460

--- Comment #2 from dave.anglin at bell dot net 2012-09-02 23:41:30 UTC ---
On 2-Sep-12, at 2:12 PM, sch...@linux-m68k.org wrote:

> This uses yet another comment character.


Thanks.  I'll see if adding it to the regexp helps.

--
John David Anglindave.ang...@bell.net


[Bug target/33135] [SH] -ffinite-math-only should not be on by default

2012-09-02 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33135

--- Comment #14 from Oleg Endo  2012-09-02 
23:18:11 UTC ---
Author: olegendo
Date: Sun Sep  2 23:18:08 2012
New Revision: 190865

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190865
Log:
PR target/33135
* common/config/sh/sh-common.c: Update copyright years.
(sh_option_init_struct): Delete.
(TARGET_OPTION_INIT_STRUCT): Likewise.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/common/config/sh/sh-common.c


[Bug target/54418] [4.8 Regression] [SH] Invalid operands for opcode

2012-09-02 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54418

--- Comment #4 from Oleg Endo  2012-09-02 23:15:30 
UTC ---
Author: olegendo
Date: Sun Sep  2 23:15:25 2012
New Revision: 190864

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190864
Log:
PR target/54418
* config/sh/sh.md (cmpgeusi_t): Remove N alternative.
Check operands[1] in split condition instead of operands[0].
Add comments.


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


[Bug middle-end/54146] Very slow compile with attribute((flatten))

2012-09-02 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146

--- Comment #59 from Steven Bosscher  2012-09-02 
22:54:34 UTC ---
FWIW Martin: SRA blows up this test case's register pressure. Compiling with
SRA enabled takes ~900s, but with -fno-tree-sra compile time almost halves.
There are extremely long live ranges for SA.* variables created by SRA.


[Bug target/33135] [SH] -ffinite-math-only should not be on by default

2012-09-02 Thread kkojima at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33135

--- Comment #13 from Kazumoto Kojima  2012-09-02 
22:43:07 UTC ---
(In reply to comment #12)
> Kaz, would it be OK to remove the whole function 'sh_option_init_struct' from 
> gcc/common/sh/sh-common.c ?

Definitely.


[Bug rtl-optimization/54456] [4.8 Regression] ICE: in init_seqno, at sel-sched.c:6797 with -fschedule-insns -fselective-scheduling

2012-09-02 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54456

--- Comment #2 from Eric Botcazou  2012-09-02 
20:06:46 UTC ---
Any specialist of selective scheduling interested here?  Otherwise:

Index: sched-rgn.c
===
--- sched-rgn.c (revision 190863)
+++ sched-rgn.c (working copy)
@@ -3473,7 +3473,7 @@ static bool
 gate_handle_sched (void)
 {
 #ifdef INSN_SCHEDULING
-  return flag_schedule_insns && dbg_cnt (sched_func);
+  return optimize > 0 && flag_schedule_insns && dbg_cnt (sched_func);
 #else
   return 0;
 #endif

is certainly good enough and would eliminate this whole class of ICEs.


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-02 Thread drepper.fsp at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #15 from Ulrich Drepper  2012-09-02 
20:04:57 UTC ---
(In reply to comment #14)
> libstdc++ should check if rdrand is supported by assembler
> before using __builtin_ia32_rdrand32_step.

Every gcc feature should have a test.  When you added the built-in this should
have happened.  The unavailability of a recent-enough compiler should therefore
have been a problem for a long time.  It's just wrong to expect a compiler to
work with binutils versions which cannot handle all the output the compiler
produces.


[Bug fortran/54463] New: -fdefault-real-8 does not promote the BLAS call when using -fexternal-blas

2012-09-02 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54463

 Bug #: 54463
   Summary: -fdefault-real-8 does not promote the BLAS call when
using -fexternal-blas
Classification: Unclassified
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: domi...@lps.ens.fr


From http://gcc.gnu.org/ml/fortran/2012-09/msg4.html :

> I just tried to compile the simple program

program test
implicit none
real, dimension(3,3) :: A
A = matmul(A,A)
end program test

> with
> $ gfortran-4.7 -fexternal-blas -fdefault-real-8 test.f95
> /tmp/cc3ij1CL.o: In function `MAIN__':
> test.f95:(.text+0x14e): undefined reference to `sgemm_'
> collect2: Fehler: ld gab 1 als Ende-Status zurück
>
> looks like matmul is replaced with sgemm and not with dgemm


[Bug fortran/54462] New: [4.8 Regression] Another "segmentation fault" after an error in COMMON statement after r190853

2012-09-02 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54462

 Bug #: 54462
   Summary: [4.8 Regression] Another "segmentation fault" after an
error in COMMON statement after r190853
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: domi...@lps.ens.fr
CC: bur...@net-b.de


After revision 190853 compiling the original test in pr29537 gives a
segmentation fault. A reduced test is

type a_t
  integer i
end type a_t

block data bd
  common c
end block data bd

common /a_t/ c
end

and the backtrace is

(gdb) run pr29537_red.f90
Starting program:
/opt/gcc/gcc4.8p-190863p3/libexec/gcc/x86_64-apple-darwin10.8.0/4.8.0/f951
pr29537_red.f90
pr29537_red.f90:5.13:

block data bd
 1   
Error: Unexpected BLOCK DATA statement at (1)
pr29537_red.f90:6.10:

  common c
  1   
Error: Unexpected COMMON statement at (1)

Program received signal SIGSEGV, Segmentation fault.
gfc_undo_symbols () at ../../p_work/gcc/fortran/symbol.c:2923
2923  st.name = st0->name;
(gdb) bt
#0  gfc_undo_symbols () at ../../p_work/gcc/fortran/symbol.c:2923
#1  0x000100077fa6 in reject_statement () at
../../p_work/gcc/fortran/parse.c:1747
#2  0x00010007e226 in parse_progunit (st=) at
../../p_work/gcc/fortran/parse.c:4168
#3  0x00010007f04f in gfc_parse_file () at
../../p_work/gcc/fortran/parse.c:4597
#4  0x0001000be5c6 in gfc_be_parse_file () at
../../p_work/gcc/fortran/f95-lang.c:191
#5  0x00010061e95f in compile_file () at ../../p_work/gcc/toplev.c:546
#6  0x000100620425 in toplev_main (argc=2, argv=0x7fff5fbfd778) at
../../p_work/gcc/toplev.c:1863
#7  0x0001aa44 in start () at
../../../p_work/libgcc/unwind-dw2-fde.c:1055


[Bug target/54461] [avr] add configure option for better AVR-Libc integration

2012-09-02 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54461

Georg-Johann Lay  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-09-02
 CC||eric.weddington at atmel
   ||dot com
   Target Milestone|--- |4.7.2
 Ever Confirmed|0   |1
   Severity|normal  |enhancement


[Bug target/54461] New: [avr] add configure option for better AVR-Libc integration

2012-09-02 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54461

 Bug #: 54461
   Summary: [avr] add configure option for better AVR-Libc
integration
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: g...@gcc.gnu.org
ReportedBy: g...@gcc.gnu.org
Target: avr


For historical reasons, AVR-Libc implements functions that GCC expects to live
in libgcc, namely float functions like __fixsfsi.

Currently, avr-gcc is not configurable to accommodate that situation which
leads to performance loss if the float support functions from libgcc are used.

This happens at least in the following situations:

* The user does not specify -lm.  -lm should only be needed
  if function from math.h are used, not for language core
  features like int i = (int) float.

* The application is LTO compiled, i.e. linked with -flto.
  The plugin machinery passes lgcc -lc lgcc through to the
  linker by means of -plugin-opt=-pass-through=-lgcc etc.
  so that -lgcc is linked prior to -lm.

* The user uses fixed <-> float conversion routines from
  libgcc.  These routines refer float functions, and the linker
  resolves these function in libgcc if they are there.

* avr-g++ is used as linker driver.

See also PR28718 and
http://lists.gnu.org/archive/html/avr-gcc-list/2012-08/msg00070.html


[Bug bootstrap/54453] [4.8 Regression] r190783 breaks bootstrap on powerpc64-unknown-linux-gnu

2012-09-02 Thread dougmencken at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54453

--- Comment #4 from Douglas Mencken  2012-09-02 
18:13:40 UTC ---
Yes, looks like my bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54459

I can add that snapshot
ftp://ftp.fu-berlin.de/unix/languages/gcc/snapshots/4.8-20120826/gcc-4.8-20120826.tar.bz2
bootstraps perfectly.

Will try with the patch.


[Bug debug/54460] FAIL: g++.dg/debug/dwarf2/nested-3.C

2012-09-02 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54460

--- Comment #1 from Andreas Schwab  2012-09-02 18:12:21 
UTC ---
This uses yet another comment character.


[Bug bootstrap/54453] [4.8 Regression] r190783 breaks bootstrap on powerpc64-unknown-linux-gnu

2012-09-02 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54453

Andreas Schwab  changed:

   What|Removed |Added

 CC||dougmencken at gmail dot
   ||com

--- Comment #3 from Andreas Schwab  2012-09-02 18:09:57 
UTC ---
*** Bug 54459 has been marked as a duplicate of this bug. ***


[Bug c++/54459] [4.8 regression] Bootstrap fails with "aliased to undefined symbol"

2012-09-02 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54459

Andreas Schwab  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #2 from Andreas Schwab  2012-09-02 18:09:57 
UTC ---
.

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


[Bug c++/54459] [4.8 regression] Bootstrap fails with "aliased to undefined symbol"

2012-09-02 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54459

--- Comment #1 from Marc Glisse  2012-09-02 18:08:16 
UTC ---
Likely a dup of PR 54453.


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-02 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |4.8.0

--- Comment #14 from H.J. Lu  2012-09-02 18:03:01 
UTC ---
libstdc++ should check if rdrand is supported by assembler
before using __builtin_ia32_rdrand32_step.


[Bug tree-optimization/54458] [4.8 Regression] ICE get_loop_body, at cfgloop.c:830

2012-09-02 Thread francesco.zappa.nardelli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54458

--- Comment #4 from Francesco Zappa Nardelli  2012-09-02 17:55:10 UTC ---
Just to be precise, the program has an undefined behaviour in the test of the
first 'if':

  (c ? 0 : 0 % 0)

because the right operand of % cannot be 0 (according to the standard,
§6.5.5#5).  Unclear to me if a compiler is allowed to crash on programs with
undefined behaviours or not.  

However an undefined-behaviour free (I believe) variant of that code makes gcc
crash similarly:

int g_24[][0];
int g_42;
int g_168[];

void func_34 (p_38) {
lbl_424:
  if (g_24[0][0] == 0 ? 1 : 1 % (g_24[0][0]))
for (; g_42; g_42--)
lbl_130: {
}
  else if (p_38)
for (;;) {
}
  if (g_168[0])
goto lbl_130;
  goto lbl_424;
}

void main () {
  g_24[0][0] = 1;
  func_34(0);
}

$ gcc -O3 input.c   (gcc version 4.8.0 20120902 (experimental) (GCC) )

input-hand.c: In function 'func_34':
input-hand.c:5:6: internal compiler error: in get_loop_body, at cfgloop.c:823
 void func_34 (p_38) {
  ^
Please submit a full bug report.

Not sure that it helps, but while I was performing test-case reduction I
noticed that the % operator plays a key role in making gcc crash here.


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-02 Thread polacek at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

Marek Polacek  changed:

   What|Removed |Added

 CC||polacek at redhat dot com

--- Comment #13 from Marek Polacek  2012-09-02 
17:52:48 UTC ---
Fails also on gcc20.fsffrance.org.


[Bug libstdc++/54448] many failures with /sbin/loader: Error: libstdc++.so.6: symbol "__pthread_mutex_init" unresolved

2012-09-02 Thread htl10 at users dot sourceforge.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54448

Hin-Tak Leung  changed:

   What|Removed |Added

   Host||alphaev68-dec-osf5.1a
  Known to fail||4.6.1, 4.7.1

--- Comment #1 from Hin-Tak Leung  
2012-09-02 17:50:41 UTC ---
4.7.1 also have a high failure rate:

=== libstdc++ Summary ===

# of expected passes4583
# of unexpected failures2519
# of expected failures41
# of unsupported tests670

I have a few others and they are similar - about 1/2 failed in libstdc++ .


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-02 Thread pault at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org

--- Comment #12 from Paul Thomas  2012-09-02 17:45:06 
UTC ---
I can confirm that revision 190787 is the problem, as Dominique originally
reported.

This is on X86_64/FC9.

Please fix it soon, someone!

Paul


[Bug tree-optimization/54458] [4.8 Regression] ICE get_loop_body, at cfgloop.c:830

2012-09-02 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54458

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-02
 CC||rguenth at gcc dot gnu.org
   Target Milestone|--- |4.8.0
Summary|ICE get_loop_body, at   |[4.8 Regression] ICE
   |cfgloop.c:830   |get_loop_body, at
   ||cfgloop.c:830
 Ever Confirmed|0   |1

--- Comment #3 from H.J. Lu  2012-09-02 17:05:24 
UTC ---
It is caused by revision

http://gcc.gnu.org/ml/gcc-cvs/2012-03/msg01244.html


[Bug debug/54460] New: FAIL: g++.dg/debug/dwarf2/nested-3.C

2012-09-02 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54460

 Bug #: 54460
   Summary: FAIL: g++.dg/debug/dwarf2/nested-3.C
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dang...@gcc.gnu.org
  Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
 Build: hppa64-hp-hpux11.11


Created attachment 28120
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28120
.s

FAIL: g++.dg/debug/dwarf2/nested-3.C -std=gnu++98  scan-assembler
[^\n\r]*\\(DIE \\(0x([0-9a-f]+)\\)
DW_TAG_namespace\\)[\n\r]+[^\n\r]*"thread[^\n\r]+[\n\r]+([^\n\r]*[\n\r]+)+[^\n\r]*\\(DIE
\\(0x([0-9a-f]+)\\)
DW_TAG_class_type\\)([\n\r]+[^\n\r]*)+"Executor[^\n\r]+[\n\r]+[^\n\r]*DW_AT_declaration[\n\r]+[^\n\r]*DW_AT_signature[^#/!|@]*[#/!|@]
[^\n\r]*\\(DIE[^\n\r]*DW_TAG_subprogram\\)[\n\r]+([^\n\r]*[\n\r]+)+[^\n\r]*"CurrentExecutor[^\n\r]+[\n\r]+([^\n\r]*[\n\r]+)+([^\n\r]*[\n\r]+)+[^\n\r]*end
of children of DIE 0x\\3[\n\r]+[^\n\r]*end of children of DIE 0x\\1[\n\r]+

and

FAIL: g++.dg/debug/dwarf2/nested-3.C -std=gnu++11  scan-assembler
[^\n\r]*\\(DIE
 \\(0x([0-9a-f]+)\\)
DW_TAG_namespace\\)[\n\r]+[^\n\r]*"thread[^\n\r]+[\n\r]+([^
\n\r]*[\n\r]+)+[^\n\r]*\\(DIE \\(0x([0-9a-f]+)\\)
DW_TAG_class_type\\)([\n\r]+[^
\n\r]*)+"Executor[^\n\r]+[\n\r]+[^\n\r]*DW_AT_declaration[\n\r]+[^\n\r]*DW_AT_si
gnature[^#/!|@]*[#/!|@]
[^\n\r]*\\(DIE[^\n\r]*DW_TAG_subprogram\\)[\n\r]+([^\n\r
]*[\n\r]+)+[^\n\r]*"CurrentExecutor[^\n\r]+[\n\r]+([^\n\r]*[\n\r]+)+([^\n\r]*[\n
\r]+)+[^\n\r]*end of children of DIE 0x\\3[\n\r]+[^\n\r]*end of children of DIE 
0x\\1[\n\r]+

Tests also fail on hppa-unknown-linux-gnu.


[Bug c++/54459] New: [4.8 regression] Bootstrap fails with "aliased to undefined symbol"

2012-09-02 Thread dougmencken at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54459

 Bug #: 54459
   Summary: [4.8 regression] Bootstrap fails with "aliased to
undefined symbol"
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dougmenc...@gmail.com


I tried to build current git master (commit
628277461faf5027a8ffb2859d9617d6579dac45 from git://gcc.gnu.org/git/gcc.git),
and got on stage 1:


libtool: compile:  /root/build-farm/_gcc_bootstrap/./gcc/xgcc -shared-libgcc
-B/root/build-farm/_gcc_bootstrap/./gcc -nostdinc++
-L/root/build-farm/_gcc_bootstrap/powerpc-gnu-linux-uclibc/libstdc++-v3/src
-L/root/build-farm/_gcc_bootstrap/powerpc-gnu-linux-uclibc/libstdc++-v3/src/.libs
-B/usr/powerpc-gnu-linux-uclibc/bin/ -B/usr/powerpc-gnu-linux-uclibc/lib/
-isystem /usr/powerpc-gnu-linux-uclibc/include -isystem
/usr/powerpc-gnu-linux-uclibc/sys-include
-I/root/build-farm/gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/../libgcc
-I/root/build-farm/_gcc_bootstrap/powerpc-gnu-linux-uclibc/libstdc++-v3/include/powerpc-gnu-linux-uclibc
-I/root/build-farm/_gcc_bootstrap/powerpc-gnu-linux-uclibc/libstdc++-v3/include
-I/root/build-farm/gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/libsupc++
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=locale-inst.lo -O3 -D_GNU_SOURCE -c
../../../../../gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/src/c++98/locale-inst.cc
 -fPIC -DPIC -o locale-inst.o
../../../../../gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/src/c++98/locale-inst.cc:362:8:
error: 'void
_ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES3_S3_RSt8ios_basecRKSs()'
aliased to undefined symbol
'_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES4_S4_RSt8ios_basecRKSs'
   
_ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES3_S3_RSt8ios_basecRKSs);
^
../../../../../gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/src/c++98/locale-inst.cc:329:19:
note: in definition of macro '_GLIBCXX_LDBL_COMPAT'
   extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
   ^
../../../../../gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/src/c++98/locale-inst.cc:360:8:
error: 'void
_ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES3_S3_RSt8ios_basecRKSs()'
aliased to undefined symbol
'_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES4_S4_RSt8ios_basecRKSs'
   
_ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES3_S3_RSt8ios_basecRKSs);
^
../../../../../gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/src/c++98/locale-inst.cc:329:19:
note: in definition of macro '_GLIBCXX_LDBL_COMPAT'
   extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
   ^
../../../../../gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/src/c++98/locale-inst.cc:358:8:
error: 'void
_ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs()'
aliased to undefined symbol
'_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs'
   
_ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
^
../../../../../gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/src/c++98/locale-inst.cc:329:19:
note: in definition of macro '_GLIBCXX_LDBL_COMPAT'
   extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
   ^
../../../../../gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/src/c++98/locale-inst.cc:356:8:
error: 'void
_ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs()'
aliased to undefined symbol
'_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs'
   
_ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
^
../../../../../gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/src/c++98/locale-inst.cc:329:19:
note: in definition of macro '_GLIBCXX_LDBL_COMPAT'
   extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
   ^
../../../../../gcc_snapshot-v4.8.0-6282774.sourcedir/libstdc++-v3/src/c++98/locale-inst.cc:352:8:
error: 'void
_ZNKSt7num_putIcSt19ostream

[Bug testsuite/54184] [4.8 Regression] gcc.dg/pr52558-1.c failure

2012-09-02 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54184

John David Anglin  changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

--- Comment #4 from John David Anglin  2012-09-02 
16:36:13 UTC ---
hppa64-hp-hpux11.11 as well.


[Bug tree-optimization/54458] ICE get_loop_body, at cfgloop.c:830

2012-09-02 Thread francesco.zappa.nardelli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54458

--- Comment #2 from Francesco Zappa Nardelli  2012-09-02 16:23:35 UTC ---
Can reproduce with the latest svn trunk as well:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/yquem/moscova/zappa/source/gcc-svn-bin/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-svn/configure --disable-bootstrap
--enable-languages=c,c++ --prefix=/home/yquem/moscova/zappa/source/gcc-svn-bin
: (reconfigured) ../gcc-svn/configure --disable-bootstrap --enable-languages=c
--prefix=/home/yquem/moscova/zappa/source/gcc-svn-bin
Thread model: posix
gcc version 4.8.0 20120902 (experimental) (GCC) 

and the exact error message now is:

input.c:3:1: internal compiler error: in get_loop_body, at cfgloop.c:823
 func_34 () {
 ^
Please submit a full bug report.


[Bug tree-optimization/54458] ICE get_loop_body, at cfgloop.c:830

2012-09-02 Thread francesco.zappa.nardelli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54458

--- Comment #1 from Francesco Zappa Nardelli  2012-09-02 15:42:45 UTC ---
$ gcc -v   
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/yquem/moscova/zappa/source/gcc-svn-bin/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-svn/configure
--prefix=/home/yquem/moscova/zappa/source/gcc-svn-bin/
Thread model: posix
gcc version 4.8.0 20120627 (experimental) (GCC) 

[a recent but not the latest svn trunk]

$ cat input.c

int a, b, c, d;
void
func_34 () {
lbl_424:
  if (c ? 0 : 0 % 0)
for (; a; a--)
lbl_130: {
}
  else if (d)
for (;;) {
}
  if (b)
goto lbl_130;
  goto lbl_424;
}
void
main () {
}

$ gcc -O3 input.c
input.c: In function 'func_34':
input.c:5:17: warning: division by zero [-Wdiv-by-zero]
   if (c ? 0 : 0 % 0)
 ^
input.c:3:1: internal compiler error: in get_loop_body, at cfgloop.c:830
 func_34 () {
 ^
Please submit a full bug report.


[Bug tree-optimization/54458] New: get_loop_body, at cfgloop.c:830

2012-09-02 Thread francesco.zappa.nardelli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54458

 Bug #: 54458
   Summary: get_loop_body, at cfgloop.c:830
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: francesco.zappa.narde...@gmail.com


[Bug rtl-optimization/54456] [4.8 Regression] ICE: in init_seqno, at sel-sched.c:6797 with -fschedule-insns -fselective-scheduling

2012-09-02 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54456

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-02
 CC||ebotcazou at gcc dot
   ||gnu.org
   Target Milestone|--- |4.8.0
 Ever Confirmed|0   |1

--- Comment #1 from H.J. Lu  2012-09-02 15:15:37 
UTC ---
It was caused by revision 187913:

http://gcc.gnu.org/ml/gcc-cvs/2012-05/msg00912.html


[Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418

2012-09-02 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54455

Steven Bosscher  changed:

   What|Removed |Added

 CC|steven at gcc dot gnu.org   |abel at gcc dot gnu.org

--- Comment #8 from Steven Bosscher  2012-09-02 
15:14:58 UTC ---
(In reply to comment #7)
But actually the problem is only visible if you print non-slim rtl. Before
sched1:

(jump_insn 13 12 15 3 (parallel [
(asm_operands/v ("") ("") 0 [
(reg:SI 62)
(reg:SI 63)
]   
 [
(asm_input:SI ("r") (null):0)
(asm_input:SI ("r") (null):0)
] 
 [
(label_ref:DI 17)
] t.c:11)
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
(clobber (mem:BLK (scratch) [0 A8]))
]) t.c:3 -1
 (nil)  
 -> 17)
(note 15 13 17 ("lab") NOTE_INSN_DELETED_LABEL 3)
(code_label 17 15 18 4 1 "" [1 uses])
(note 18 17 0 4 [bb 4] NOTE_INSN_BASIC_BLOCK)

After sched1:

(jump_insn 13 12 15 3 (parallel [
(asm_operands/v ("") ("") 0 [
(reg:SI 62)
(reg:SI 63) 
]
 [   
(asm_input:SI ("r") (null):0)
(asm_input:SI ("r") (null):0)
]
 [   
(label_ref:DI 17) <--- ref to code_label 17
] t.c:11)
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
(clobber (mem:BLK (scratch) [0 A8]))
]) t.c:3 -1
 (expr_list:REG_DEAD (reg:SI 63)
(expr_list:REG_DEAD (reg:SI 62) 
(expr_list:REG_UNUSED (reg:QI 18 fpsr)
(expr_list:REG_UNUSED (reg:QI 17 flags)
(nil)
 -> 17)
(note 15 13 21 ("lab") NOTE_INSN_DELETED_LABEL 3)
...but code_label 17 has disappeared...
(note 21 15 0 NOTE_INSN_DELETED)

Note that the jump_insn now jumps to a non-existing label.

There are two problems here:

1. verify_flow_info should detect that a jump references a non-existing label,
and abort if that happens

2. The code_label 17 shouldn't be removed by the selective scheduler because
it's still referenced.


[Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418

2012-09-02 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54455

Steven Bosscher  changed:

   What|Removed |Added

 CC||steven at gcc dot gnu.org

--- Comment #7 from Steven Bosscher  2012-09-02 
14:58:24 UTC ---
Before thread_prologue_and_epilogue_insns:

basic block 3, loop depth 0
 pred:   2
L9:
   10 NOTE_INSN_BASIC_BLOCK
11: ax=0x1
12: dx=0x2
13: jump {asm_operands;clobber fpsr;clobber flags;clobber [scratch];}
 succ:   EXIT

and after:

basic block 3, loop depth 0
 pred:   2
L9:
   10 NOTE_INSN_BASIC_BLOCK
11: ax=0x1
12: dx=0x2
   28 NOTE_INSN_EPILOGUE_BEG
29: bp=[sp++]
  REG_CFA_DEF_CFA: sp+0x8
30: jump simple_return
i  31: barrier
 succ:   EXIT


[Bug target/54445] TLS array lookup with negative constant is not combined into a single instruction

2012-09-02 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54445

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2012-09/msg00039.htm
   ||l
   Last reconfirmed||2012-09-02
   Target Milestone|--- |4.8.0
 Ever Confirmed|0   |1

--- Comment #5 from H.J. Lu  2012-09-02 14:21:41 
UTC ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00039.html


[Bug target/54290] [4.6 regression] wrong code at -O2 with large offset

2012-09-02 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54290

Eric Botcazou  changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2012-09/msg00037.htm
   ||l
   Target Milestone|--- |4.6.4


[Bug target/54445] TLS array lookup with negative constant is not combined into a single instruction

2012-09-02 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54445

H.J. Lu  changed:

   What|Removed |Added

 CC||jakub at redhat dot com

--- Comment #4 from H.J. Lu  2012-09-02 14:06:26 
UTC ---
(In reply to comment #2)
> This is due to the definition of x86_64_immediate_operand predicate, following
> part:
> 
> case UNSPEC:
>   switch (XINT (op1, 1))
> {
> case UNSPEC_DTPOFF:
> case UNSPEC_NTPOFF:
>   if (offset > 0
>   && trunc_int_for_mode (offset, SImode) == offset)
> return true;
> }
> 
> I don't know why negative offsets are not allowed here.

It was added by

http://gcc.gnu.org/ml/gcc-cvs/2002-10/msg00685.html
http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=29d8dd5cee1f9ebd56b4473a690fcc54ad986265


[Bug rtl-optimization/53942] [4.6 Regression] unable to find a register to spill in class 'CREG'

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53942

--- Comment #8 from Uros Bizjak  2012-09-02 13:57:01 
UTC ---
The proposed patch from Comment #4 is not effective on 4.6 branch.


[Bug target/54457] New: [x32] Fail to combine 64bit index + constant

2012-09-02 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54457

 Bug #: 54457
   Summary: [x32] Fail to combine 64bit index + constant
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com
CC: ubiz...@gmail.com


[hjl@gnu-ivb-1 pr54445]$ cat z.i
extern char array[40];

char
foo (long long int position) {
  return array[position + 1];
}
[hjl@gnu-ivb-1 pr54445]$
/export/build/gnu/gcc-x32/build-x86_64-linux/prev-gcc/xgcc
-B/export/build/gnu/gcc-x32/build-x86_64-linux/prev-gcc/ -Wall -O2 -std=gnu11
-mx32 -S z.i -da
[hjl@gnu-ivb-1 pr54445]$ cat z.s
.file"z.i"
.text
.p2align 4,,15
.globlfoo
.typefoo, @function
foo:
.LFB0:
.cfi_startproc
addq$1, %rdi
movzblarray(%edi), %eax
ret
.cfi_endproc
.LFE0:
.sizefoo, .-foo
.ident"GCC: (GNU) 4.8.0 20120901 (experimental)"
.section.note.GNU-stack,"",@progbits
[hjl@gnu-ivb-1 pr54445]$ 

combine fails on:

Trying 6 -> 8:
Failed to match this instruction:
(set (reg:QI 66)
(mem/j:QI (plus:SI (subreg:SI (plus:DI (reg/v:DI 62 [ position ])
(const_int 1 [0x1])) 0)
(symbol_ref:SI ("array") [flags 0x40]  )) [0 array S1 A8]))

This should be a valid address.


[Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54455

Uros Bizjak  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
URL|http://gcc.gnu.org/ml/gcc-p |
   |atches/2012-09/msg00031.htm |
   |l   |
 AssignedTo|ubizjak at gmail dot com|unassigned at gcc dot
   ||gnu.org

--- Comment #6 from Uros Bizjak  2012-09-02 12:44:18 
UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> 
> > (jump_insn 30 29 31 3 (simple_return) pr54455.c:16 -1
> >  (nil)
> >  -> simple_return)
> >
> 
> This should be BB_END(BASIC_BLOCK(3)). If it's not then someone forgot to
> update the basic block boundaries at some point.

(gdb) p debug_bb_n_slim (3)
basic block 3, loop depth 0
 pred:   2
L9:
   10 NOTE_INSN_BASIC_BLOCK
11: ax=0x1
12: dx=0x2
   28 NOTE_INSN_EPILOGUE_BEG
29: bp=[sp++]
  REG_CFA_DEF_CFA: sp+0x8
30: jump simple_return
i  31: barrier
 succ:   EXIT

This is now beyond my RTL-optimization fu.


[Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418

2012-09-02 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54455

--- Comment #5 from Steven Bosscher  2012-09-02 
12:27:27 UTC ---
(In reply to comment #4)

> (jump_insn 30 29 31 3 (simple_return) pr54455.c:16 -1
>  (nil)
>  -> simple_return)
>

This should be BB_END(BASIC_BLOCK(3)). If it's not then someone forgot to
update the basic block boundaries at some point.


[Bug c/54454] gcc violates c99 specification w.r.t. flexible arrays

2012-09-02 Thread jsm28 at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54454

Joseph S. Myers  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #3 from Joseph S. Myers  2012-09-02 
12:20:39 UTC ---
All the text you are quoting changed in TC2 following DR 282.


[Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54455

--- Comment #4 from Uros Bizjak  2012-09-02 12:10:45 
UTC ---
(In reply to comment #3)

> What does the insns list look like around the BARRIER? (From GDB do:
> "p debug_rtx_list(barrier_insn, -7)" and show the result here.)

(gdb) p debug_rtx_list(r, -7)
(note 28 12 29 3 NOTE_INSN_EPILOGUE_BEG)

(insn/f 29 28 30 3 (set (reg/f:DI 6 bp)
(mem:DI (post_inc:DI (reg/f:DI 7 sp)) [0 S8 A8])) pr54455.c:16 -1
 (expr_list:REG_CFA_DEF_CFA (plus:DI (reg/f:DI 7 sp)
(const_int 8 [0x8]))
(nil)))

(jump_insn 30 29 31 3 (simple_return) pr54455.c:16 -1
 (nil)
 -> simple_return)

(barrier 31 30 15)

(note 15 31 21 ("lab") NOTE_INSN_DELETED_LABEL 3)

(note 21 15 24 NOTE_INSN_DELETED)

(note 24 21 0 NOTE_INSN_DELETED)


[Bug c++/46687] Class member lookup ambiguity w/ overloaded static members and using declarations

2012-09-02 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46687

fabien at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-09-02
 Ever Confirmed|0   |1


[Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418

2012-09-02 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54455

--- Comment #3 from Steven Bosscher  2012-09-02 
11:47:18 UTC ---
The patch is incorrect. There can't be a BARRIER in the middle of a basic
block. This problem typically indicates that either a BARRIER was emitted in
the wrong place, or BB_END wasn't updated properly after a BARRIER was inserted
somewhere. BARRIERs never appear inside a basic block.

What does the insns list look like around the BARRIER? (From GDB do:
"p debug_rtx_list(barrier_insn, -7)" and show the result here.)


[Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54455

Uros Bizjak  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2012-09/msg00031.htm
   ||l
 AssignedTo|unassigned at gcc dot   |ubizjak at gmail dot com
   |gnu.org |

--- Comment #2 from Uros Bizjak  2012-09-02 11:24:51 
UTC ---
Patch at [1].

[1] http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00031.html


[Bug rtl-optimization/54455] [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54455

Uros Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-02
   Target Milestone|--- |4.7.2
 Ever Confirmed|0   |1

--- Comment #1 from Uros Bizjak  2012-09-02 10:49:33 
UTC ---
Patch:

Index: cfgrtl.c
===
--- cfgrtl.c(revision 190857)
+++ cfgrtl.c(working copy)
@@ -415,7 +415,8 @@ compute_bb_for_insn (void)

   for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn))
{
- BLOCK_FOR_INSN (insn) = bb;
+ if (!BARRIER_P (insn))
+   BLOCK_FOR_INSN (insn) = bb;
  if (insn == end)
break;
}


[Bug rtl-optimization/54369] delayed-branch pass removes too many instructions

2012-09-02 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54369

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #13 from Eric Botcazou  2012-09-02 
10:47:46 UTC ---
On all active branches.


[Bug rtl-optimization/54369] delayed-branch pass removes too many instructions

2012-09-02 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54369

--- Comment #12 from Eric Botcazou  2012-09-02 
10:37:52 UTC ---
Author: ebotcazou
Date: Sun Sep  2 10:37:49 2012
New Revision: 190860

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190860
Log:
PR rtl-optimization/54369
* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
calling dbr_schedule.
* config/sparc/sparc.c (sparc_reorg): Likewise.

Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/mips/mips.c
branches/gcc-4_6-branch/gcc/config/sparc/sparc.c


[Bug rtl-optimization/54369] delayed-branch pass removes too many instructions

2012-09-02 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54369

--- Comment #11 from Eric Botcazou  2012-09-02 
10:37:00 UTC ---
Author: ebotcazou
Date: Sun Sep  2 10:36:54 2012
New Revision: 190859

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190859
Log:
PR rtl-optimization/54369
* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
calling dbr_schedule.
* config/sparc/sparc.c (sparc_reorg): Likewise.

Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/mips/mips.c
branches/gcc-4_7-branch/gcc/config/sparc/sparc.c

--- Comment #12 from Eric Botcazou  2012-09-02 
10:37:52 UTC ---
Author: ebotcazou
Date: Sun Sep  2 10:37:49 2012
New Revision: 190860

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190860
Log:
PR rtl-optimization/54369
* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
calling dbr_schedule.
* config/sparc/sparc.c (sparc_reorg): Likewise.

Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/mips/mips.c
branches/gcc-4_6-branch/gcc/config/sparc/sparc.c


[Bug rtl-optimization/54369] delayed-branch pass removes too many instructions

2012-09-02 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54369

--- Comment #10 from Eric Botcazou  2012-09-02 
10:36:31 UTC ---
Author: ebotcazou
Date: Sun Sep  2 10:36:27 2012
New Revision: 190858

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190858
Log:
PR rtl-optimization/54369
* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
calling dbr_schedule.
* config/sparc/sparc.c (sparc_reorg): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mips/mips.c
trunk/gcc/config/sparc/sparc.c

--- Comment #11 from Eric Botcazou  2012-09-02 
10:37:00 UTC ---
Author: ebotcazou
Date: Sun Sep  2 10:36:54 2012
New Revision: 190859

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190859
Log:
PR rtl-optimization/54369
* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
calling dbr_schedule.
* config/sparc/sparc.c (sparc_reorg): Likewise.

Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/mips/mips.c
branches/gcc-4_7-branch/gcc/config/sparc/sparc.c

--- Comment #12 from Eric Botcazou  2012-09-02 
10:37:52 UTC ---
Author: ebotcazou
Date: Sun Sep  2 10:37:49 2012
New Revision: 190860

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190860
Log:
PR rtl-optimization/54369
* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
calling dbr_schedule.
* config/sparc/sparc.c (sparc_reorg): Likewise.

Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/mips/mips.c
branches/gcc-4_6-branch/gcc/config/sparc/sparc.c


[Bug rtl-optimization/54369] delayed-branch pass removes too many instructions

2012-09-02 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54369

--- Comment #10 from Eric Botcazou  2012-09-02 
10:36:31 UTC ---
Author: ebotcazou
Date: Sun Sep  2 10:36:27 2012
New Revision: 190858

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190858
Log:
PR rtl-optimization/54369
* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
calling dbr_schedule.
* config/sparc/sparc.c (sparc_reorg): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mips/mips.c
trunk/gcc/config/sparc/sparc.c

--- Comment #11 from Eric Botcazou  2012-09-02 
10:37:00 UTC ---
Author: ebotcazou
Date: Sun Sep  2 10:36:54 2012
New Revision: 190859

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190859
Log:
PR rtl-optimization/54369
* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
calling dbr_schedule.
* config/sparc/sparc.c (sparc_reorg): Likewise.

Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/mips/mips.c
branches/gcc-4_7-branch/gcc/config/sparc/sparc.c


[Bug rtl-optimization/54369] delayed-branch pass removes too many instructions

2012-09-02 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54369

--- Comment #10 from Eric Botcazou  2012-09-02 
10:36:31 UTC ---
Author: ebotcazou
Date: Sun Sep  2 10:36:27 2012
New Revision: 190858

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190858
Log:
PR rtl-optimization/54369
* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
calling dbr_schedule.
* config/sparc/sparc.c (sparc_reorg): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mips/mips.c
trunk/gcc/config/sparc/sparc.c


[Bug rtl-optimization/54456] New: [4.8 Regression] ICE: in init_seqno, at sel-sched.c:6797 with -fschedule-insns -fselective-scheduling

2012-09-02 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54456

 Bug #: 54456
   Summary: [4.8 Regression] ICE: in init_seqno, at
sel-sched.c:6797 with -fschedule-insns
-fselective-scheduling
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz


Created attachment 28119
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28119
reduced testcase

Compiler output:
$ gcc -fschedule-insns -fselective-scheduling --param
max-sched-extend-regions-iters=8 testcase.c 
testcase.c: In function 'foo':
testcase.c:5:1: internal compiler error: in init_seqno, at sel-sched.c:6797
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

(gdb) bt
#0  0x01131fc0 in internal_error(char const*, ...) ()
#1  0x01130b74 in fancy_abort(char const*, int, char const*) ()
#2  0x009aa0bf in init_seqno(bitmap_head_def*, basic_block_def*) () at
/mnt/svn/gcc-trunk/gcc/sel-sched.c:6797
#3  0x009b7aa1 in sel_sched_region(int) () at
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7520
#4  0x009b923a in run_selective_scheduling() () at
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7709
#5  0x00988ffe in rest_of_handle_sched() () at
/mnt/svn/gcc-trunk/gcc/sched-rgn.c:3489
#6  0x0090092f in execute_one_pass(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2157
#7  0x00900ce5 in execute_pass_list(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2212
#8  0x00900cf7 in execute_pass_list(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2213
#9  0x006bdd88 in expand_function(cgraph_node*) () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1609
#10 0x006bff02 in compile() () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1803
#11 0x006c0225 in finalize_compilation_unit() () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:2089
#12 0x005a1dc0 in c_write_global_declarations() () at
/mnt/svn/gcc-trunk/gcc/c/c-decl.c:10116
#13 0x009e8475 in compile_file() () at
/mnt/svn/gcc-trunk/gcc/toplev.c:560
#14 0x009ea03a in toplev_main(int, char**) () at
/mnt/svn/gcc-trunk/gcc/toplev.c:1863
#15 0x76e784bd in __libc_start_main () from /lib64/libc.so.6
#16 0x00584d01 in _start ()

Tested revisions:
r190830 - crash
4.7 r188682 - OK


[Bug rtl-optimization/54455] New: [4.7/4.8 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418

2012-09-02 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54455

 Bug #: 54455
   Summary: [4.7/4.8 Regression] ICE: RTL check: expected elt 3
type 'B', have '0' (rtx barrier) in
compute_bb_for_insn, at cfgrtl.c:418
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz


Created attachment 28118
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28118
reduced testcase (from gcc.c-torture/compile/pr51767.c)

Compiler output:
$ gcc -fschedule-insns -fselective-scheduling --param
max-sched-extend-regions-iters=8 testcase.c
testcase.c: In function 'bar':
testcase.c:11:1: internal compiler error: RTL check: expected elt 3 type 'B',
have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

(gdb) bt
#0  0x01131fc0 in internal_error(char const*, ...) ()
#1  0x0096d82b in rtl_check_failed_type1(rtx_def const*, int, int, char
const*, int, char const*) () at /mnt/svn/gcc-trunk/gcc/rtl.c:753
#2  0x006a94b8 in compute_bb_for_insn() () at
/mnt/svn/gcc-trunk/gcc/cfgrtl.c:418
#3  0x00c29723 in ix86_reorg() () at
/mnt/svn/gcc-trunk/gcc/config/i386/i386.c:33774
#4  0x0096d27a in rest_of_handle_machine_reorg() ()
#5  0x0090092f in execute_one_pass(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2157
#6  0x00900ce5 in execute_pass_list(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2212
#7  0x00900cf7 in execute_pass_list(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2213
#8  0x00900cf7 in execute_pass_list(opt_pass*) () at
/mnt/svn/gcc-trunk/gcc/passes.c:2213
#9  0x006bdd88 in expand_function(cgraph_node*) () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1609
#10 0x006bff02 in compile() () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1803
#11 0x006c0225 in finalize_compilation_unit() () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:2089
#12 0x005a1dc0 in c_write_global_declarations() () at
/mnt/svn/gcc-trunk/gcc/c/c-decl.c:10116
#13 0x009e8475 in compile_file() () at
/mnt/svn/gcc-trunk/gcc/toplev.c:560
#14 0x009ea03a in toplev_main(int, char**) () at
/mnt/svn/gcc-trunk/gcc/toplev.c:1863
#15 0x76e784bd in __libc_start_main () from /lib64/libc.so.6
#16 0x00584d01 in _start ()

Tested revisions:
r190830 - crash
4.7 r188682 - crash
4.6 r188682 - OK


[Bug target/42536] [4.6/4.7/4.8 regression] ICE in spill_failure, at reload1.c:2141

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42536

--- Comment #12 from Uros Bizjak  2012-09-02 09:44:12 
UTC ---
(In reply to comment #11)

> Reconfirmed.

BTW: Moving the complex address to the temporary (as proposed in Comment #4)
would help "atomic_compare_and_swap_doubleword" on 32bit x86 targets, too.
This pattern uses cmpxchg8b_pic_memory_operand predicate to limit the number of
address registers for 32bit x86 targets, in order to avoid spill failures.
Please see i386/sync.md.


[Bug target/42536] [4.6/4.7/4.8 regression] ICE in spill_failure, at reload1.c:2141

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42536

Uros Bizjak  changed:

   What|Removed |Added

   Last reconfirmed|2010-03-20 13:03:43 |2012-09-02

--- Comment #11 from Uros Bizjak  2012-09-02 09:22:34 
UTC ---
(In reply to comment #7)
> I cannot reproduce this bug on the trunk or 4.6.

Try with "-O2 -fno-gcse -fno-omit-frame-pointer -m32", it fails on 4.6+.

Reconfirmed.


[Bug target/49206] [4.6 Regression] RA failure in spill_failure, at reload1.c:2113

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49206

Uros Bizjak  changed:

   What|Removed |Added

   Target Milestone|4.8.0   |4.6.4
Summary|[4.6/4.7/4.8 Regression] RA |[4.6 Regression] RA failure
   |failure in spill_failure,   |in spill_failure, at
   |at reload1.c:2113   |reload1.c:2113

--- Comment #12 from Uros Bizjak  2012-09-02 09:10:15 
UTC ---
Let's keep this PR open as a 4.6 regression.


[Bug target/49206] [4.6/4.7/4.8 Regression] RA failure in spill_failure, at reload1.c:2113

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49206

Uros Bizjak  changed:

   What|Removed |Added

  Known to work||4.7.1
   Target Milestone|4.6.4   |4.8.0
  Known to fail||4.6.3

--- Comment #11 from Uros Bizjak  2012-09-02 08:58:52 
UTC ---
Closed as fixed in 4.8.0.


[Bug target/49206] [4.6/4.7/4.8 Regression] RA failure in spill_failure, at reload1.c:2113

2012-09-02 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49206

--- Comment #10 from uros at gcc dot gnu.org 2012-09-02 08:49:37 UTC ---
Author: uros
Date: Sun Sep  2 08:49:31 2012
New Revision: 190857

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190857
Log:
PR target/49206
* gcc.c-torture/compile/pr49206.c: New test.


Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr49206.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug target/49206] [4.6/4.7/4.8 Regression] RA failure in spill_failure, at reload1.c:2113

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49206

--- Comment #9 from Uros Bizjak  2012-09-02 08:35:45 
UTC ---
(In reply to comment #7)

> > This went away with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181075
> > but was it really a fix for this, rather than just something that made the 
> > bug
> > latent?
> 
> I am afraid that the change is not relevant for this bug, so the later...

I have backed up r181075 on the mainline, and the test still passes.  I will
put the test to compile torture testsuite, as this is the maximum we can do
now.


[Bug target/36680] ICE in spill_failure, reload1.c:1995

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680

Uros Bizjak  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Known to work||4.5.3, 4.6.3, 4.7.1
 Resolution||FIXED
   Target Milestone|--- |4.8.0

--- Comment #10 from Uros Bizjak  2012-09-02 08:12:44 
UTC ---
Closed as fixed in 4.8.0.


[Bug target/36680] ICE in spill_failure, reload1.c:1995

2012-09-02 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680

--- Comment #9 from uros at gcc dot gnu.org 2012-09-02 08:10:26 UTC ---
Author: uros
Date: Sun Sep  2 08:10:21 2012
New Revision: 190855

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190855
Log:
PR target/36680
* gfortran.dg/pr36680.f90: New test.


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


[Bug target/36680] ICE in spill_failure, reload1.c:1995

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680

--- Comment #8 from Uros Bizjak  2012-09-02 08:01:50 
UTC ---
(In reply to comment #7)

> What is the magic to avoid the -O in "-O  -O1 -fschedule-insns"?

You can't.  This is how currently gfortran testsuite works.

The part that should eventually be fixed is in lib/gfortran.exp:

# look if this is dg-do-run test, in which case
# we cycle through the option list, otherwise we don't
if [expr [search_for $test "dg-do run"]] {
set option_list $torture_with_loops
} else {
set option_list [list { -O } ]
}


[Bug target/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns

2012-09-02 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42295

Uros Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to work||4.6.3, 4.7.1
 Resolution||FIXED
   Target Milestone|--- |4.8.0

--- Comment #9 from Uros Bizjak  2012-09-02 07:13:53 
UTC ---
Closed as fixed in 4.8.0.


[Bug target/42295] ICE: 'error: unable to find a register to spill in class "AREG"' with -fschedule-insns

2012-09-02 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42295

--- Comment #8 from uros at gcc dot gnu.org 2012-09-02 07:07:50 UTC ---
Author: uros
Date: Sun Sep  2 07:07:45 2012
New Revision: 190854

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190854
Log:
PR target/42295
* g++.dg/opt/pr42295.C: New test.


Added:
trunk/gcc/testsuite/g++.dg/opt/pr42295.C
Modified:
trunk/gcc/testsuite/ChangeLog