[Bug tree-optimization/50955] [4.7 Regression] IVopts incorrectly rewrite the address of a global memory access into a local form.

2013-08-16 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50955

--- Comment #15 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #14)
> I am running into a similar situation with a modified 4.7 on
> mips64-linux-gnu (configured to use the Octeon2 instructions which has a
> load instruction which does base+index [or rather reg+reg]).

Before IV-OPTS I have this use:
  i.17_13 = (sizetype) i_52;
  D.13668_14 = i.17_13 + -1;
  D.13669_15 = D.13668_14 * 4;
  D.13670_16 = D.13666_12 + D.13669_15;
  att_17 = *D.13670_16;

But we decided that it was not used as an address here though.  We have:
(gdb) p *use->iv
$15 = {base = 0x777e1c60, base_object = 0x0, step = 0x777e1c60,
ssa_name = 0x0, biv_p = 0 '\000', 
  have_use_for = 1 '\001', use_id = 0}
(gdb) p *use
$16 = {id = 3, type = USE_NONLINEAR_EXPR, iv = 0x1376bb0, stmt =
0x7727c780, op_p = 0x0, related_cands = 0x0, 
  n_map_members = 10, cost_map = 0x13de580, selected = 0x0}


[Bug target/58158] internal compiler error: in extract_insn, at recog.c:2150 while compiling ImageMagick on mipsel

2013-08-16 Thread aaro.koskinen at iki dot fi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58158

Aaro Koskinen  changed:

   What|Removed |Added

  Known to work||4.7.3
  Known to fail||4.8.0, 4.8.1

--- Comment #2 from Aaro Koskinen  ---
Reproducible also with 4.8.0 but not with 4.7.3.


[Bug c++/58173] [C++11] Bad interaction between sizeof... and remainder (%) operators

2013-08-16 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58173

--- Comment #1 from Paolo Carlini  ---
Whatever it is, must be pretty subtle, current clang++ and icc also accept it.


[Bug c++/58173] [C++11] Bad interaction between sizeof... and remainder (%) operators

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58173

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
I don't think this is a bug.  sizeof... has type std::size_t, and while
(-1) % 5 is -1, (-1) % 5UL is 0.


[Bug c++/58173] [C++11] Bad interaction between sizeof... and remainder (%) operators

2013-08-16 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58173

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #3 from Paolo Carlini  ---
Indeed, I was about to point out that the testcase really is just:

  static_assert( (-1) % 5  == -1, "" );
  static_assert( (-1) % 5u != -1, "" );


[Bug target/58158] internal compiler error: in extract_insn, at recog.c:2150 while compiling ImageMagick on mipsel

2013-08-16 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58158

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpe at it dot uu.se,
   ||pinskia at gcc dot gnu.org

--- Comment #3 from Mikael Pettersson  ---
Started with the "Improve COND_EXPR expansion" patch in r187183.  Still occurs
with recent trunk and head of 4.8 branch.  Author CC:d.


[Bug regression/58165] [4.8/4.9 regression] internal compiler error: verify_flow_info

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Fri Aug 16 08:57:29 2013
New Revision: 201780

URL: http://gcc.gnu.org/viewcvs?rev=201780&root=gcc&view=rev
Log:
PR tree-optimization/58165
* tree-call-cdce.c (shrink_wrap_one_built_in_call): If
bi_call must be the last stmt in a bb, don't split_block, instead
use fallthru edge from it and give up if there is none.
Release conds vector when returning early.

* g++.dg/opt/pr58165.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/opt/pr58165.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-call-cdce.c

Author: jakub
Date: Fri Aug 16 09:04:52 2013
New Revision: 201781

URL: http://gcc.gnu.org/viewcvs?rev=201781&root=gcc&view=rev
Log:
PR tree-optimization/58165
* tree-call-cdce.c (shrink_wrap_one_built_in_call): If
bi_call must be the last stmt in a bb, don't split_block, instead
use fallthru edge from it and give up if there is none.
Release conds vector when returning early.

* g++.dg/opt/pr58165.C: New test.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/opt/pr58165.C
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/tree-call-cdce.c


[Bug tree-optimization/58164] internal compiler error: in make_decl_rtl, at varasm.c:1147

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58164

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Fri Aug 16 09:05:52 2013
New Revision: 201782

URL: http://gcc.gnu.org/viewcvs?rev=201782&root=gcc&view=rev
Log:
PR tree-optimization/58164
* gimple.c (walk_stmt_load_store_addr_ops): For visit_addr
walk gimple_goto_dest of GIMPLE_GOTO.

* gcc.c-torture/compile/pr58164.c: New test.

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

Author: jakub
Date: Fri Aug 16 09:06:41 2013
New Revision: 201784

URL: http://gcc.gnu.org/viewcvs?rev=201784&root=gcc&view=rev
Log:
PR tree-optimization/58164
* gimple.c (walk_stmt_load_store_addr_ops): For visit_addr
walk gimple_goto_dest of GIMPLE_GOTO.

* gcc.c-torture/compile/pr58164.c: New test.

Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/compile/pr58164.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/gimple.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug target/58105] wrong code generation for multiversioned functions

2013-08-16 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58105

--- Comment #7 from Uroš Bizjak  ---
Fixed.

[Bug target/58105] wrong code generation for multiversioned functions

2013-08-16 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58105

Uroš Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2013-08/msg00770.htm
   ||l
 Resolution|--- |FIXED
   Target Milestone|--- |4.9.0

--- Comment #6 from Uroš Bizjak  ---
Author: uros
Date: Fri Aug 16 13:22:36 2013
New Revision: 201790

URL: http://gcc.gnu.org/viewcvs?rev=201790&root=gcc&view=rev
Log:
PR target/58105
* config/i386/i386.c (make_resolver_func): Set DECL_UNINLINABLE.


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

[Bug c++/58174] New: gcc miscompiles code

2013-08-16 Thread galtgendo at o2 dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58174

Bug ID: 58174
   Summary: gcc miscompiles code
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: galtgendo at o2 dot pl

Created attachment 30665
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30665&action=edit
preprocessed file that miscompiles

Using built-in specs.
COLLECT_GCC=gcc-4.8.1
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.8.1/work/gcc-4.8.1/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.1
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.1/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.1
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.1/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.1/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.1/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --with-cloog --disable-isl-version-check --enable-lto
--enable-nls --without-included-gettext --with-system-zlib --enable-obsolete
--disable-werror --enable-secureplt --enable-multilib
--with-multilib-list=m32,m64 --enable-libmudflap --disable-libssp
--enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.1/python
--enable-checking=release --disable-libgcj --enable-libstdcxx-time
--enable-objc-gc --enable-languages=c,c++,objc,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-targets=all --with-bugurl=http://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.8.1 p1.0, pie-0.5.6' --disable-libstdcxx-pch
Thread model: posix
gcc version 4.8.1 (Gentoo 4.8.1 p1.0, pie-0.5.6)

The command:
gc -DHAVE_INTTYPES=1 -O2 -Wall -Wextra -I/usr/include/SDL -I/usr/include/AL
-I/usr/include/libmodplug -o snd_flac.o -c snd_flac.cpp

Notes:
- even '-O' triggers the bug
- at '-O2', for whatever the reason, '-fno-guess-branch-probability' makes
things work


[Bug c++/58174] gcc miscompiles code

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58174

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Given that the attached testcase isn't self-contained, it would be helpful if
you could state where exactly the miscompilation happens, why do you think it
is miscompilation and what to look for.


[Bug debug/58123] [4.8/4.9 Regression] debug line not tracked for last autovariable dtor

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58123

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |4.8.2
Summary|[4.8 Regression] debug line |[4.8/4.9 Regression] debug
   |not tracked for last|line not tracked for last
   |autovariable dtor   |autovariable dtor


[Bug libstdc++/58168] Installation of GCC 4.8.1 (libstdc++) hangs in make_sunver.pl on Solaris10/SPARC

2013-08-16 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58168

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2013-08-16
 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Eric Botcazou  ---
> I'm using GNU c++filt (C++ demangler), version 2.95.3.

What's the output of c++filt --version?  This works fine on Solaris 10 with:

GNU c++filt (GNU Binutils) 2.23.1
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

> It works fine on Solaris 11 (SPARC), RHEL 4/5/6.

Do you have the same version of c++filt on the Solaris 11 machine?


[Bug c++/58083] [4.8/4.9 Regression] ICE with lambda as default parameter of a template function

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58083

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |4.8.2


[Bug c++/58119] [4.7/4.8/4.9 Regression] Invalid ambiguous default type conversion with only a single invalid conversion listed.

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58119

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |4.7.4


[Bug libstdc++/58168] Installation of GCC 4.8.1 (libstdc++) hangs in make_sunver.pl on Solaris10/SPARC

2013-08-16 Thread Andre.Schneider at eas dot iis.fraunhofer.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58168

--- Comment #3 from André Schneider  ---
(In reply to Eric Botcazou from comment #2)
> > I'm using GNU c++filt (C++ demangler), version 2.95.3.
> 
> What's the output of c++filt --version?  

Maybe the version is too old:

---
[local@raymund6:~]>which c++filt
/usr/local/bin/c++filt
[local@raymund6:~]>c++filt --version
GNU c++filt (C++ demangler), version 2.95.3
[local@raymund6:~]>ll `which c++filt`
-rwxr-xr-x   1 locallocal 136892 Dec 14  2005 /usr/local/bin/c++filt*
---

> 
> Do you have the same version of c++filt on the Solaris 11 machine?

Here we have only the non-GNU version:

[local@raymund7:~]>which c++filt
/opt/solarisstudio12.3/bin/c++filt
[local@raymund7:~]>c++filt --version
Could not open input file "--version"

Ok, I see ... maybe the filter step has been skipped???

/André

[Bug c++/58174] gcc miscompiles code

2013-08-16 Thread galtgendo at o2 dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58174

--- Comment #2 from Rafał Mużyło  ---
By "miscompiles", in this case I mean there's no error during compilation, but
the produced executable fails to work.

I'm not very familiar with the code of the project, that this file comes from,
but it's a quite complex bit of C++, which makes it difficult (on my skil
level) to tell what exactly goes wrong. I've only managed to find which source
file was the apparent culprit of the crash upon running.

[Bug c++/58174] gcc miscompiles code

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58174

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2013-08-16
 Ever confirmed|0   |1

--- Comment #3 from Jakub Jelinek  ---
Then the report is useless.  I don't think anybody is going to bother verifying
the whole compilation unit without knowing what to look for, and with no
reproducer there is nothing to do.


[Bug c++/58174] gcc miscompiles code

2013-08-16 Thread galtgendo at o2 dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58174

--- Comment #4 from Rafał Mużyło  ---
How could I narrow it down then ?

[Bug libstdc++/58168] Installation of GCC 4.8.1 (libstdc++) hangs in make_sunver.pl on Solaris10/SPARC

2013-08-16 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58168

--- Comment #4 from Eric Botcazou  ---
> Maybe the version is too old:
> 
> ---
> [local@raymund6:~]>which c++filt
> /usr/local/bin/c++filt
> [local@raymund6:~]>c++filt --version
> GNU c++filt (C++ demangler), version 2.95.3

Probably, yes.  The configuration notes read:

"To enable symbol versioning in ‘libstdc++’ with Sun ld, you need to have any
version of GNU c++filt, which is part of GNU binutils. ‘libstdc++’ symbol
versioning will be disabled if no appropriate version is found. Sun c++filt
from the Sun Studio compilers does not work."

so I'd try to download and compile a recent version of GNU binutils.

> Here we have only the non-GNU version:
> 
> [local@raymund7:~]>which c++filt
> /opt/solarisstudio12.3/bin/c++filt
> [local@raymund7:~]>c++filt --version
> Could not open input file "--version"
> 
> Ok, I see ... maybe the filter step has been skipped???

Yes, and this means that the library isn't versioned.

[Bug target/58158] internal compiler error: in extract_insn, at recog.c:2150 while compiling ImageMagick on mipsel

2013-08-16 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58158

--- Comment #4 from Andrew Pinski  ---
(In reply to Mikael Pettersson from comment #3)
> Started with the "Improve COND_EXPR expansion" patch in r187183.  Still
> occurs with recent trunk and head of 4.8 branch.  Author CC:d.

That means it was exposed by that.  We have had many target (PPC, x86, and arm)
specific bugs due to this patch too.  This is not surprising we have one in
MIPS too.  Though I did test on mips64 (only n64 and n32 and not loongson
though).


[Bug libstdc++/58168] Installation of GCC 4.8.1 (libstdc++) hangs in make_sunver.pl on Solaris10/SPARC

2013-08-16 Thread Andre.Schneider at eas dot iis.fraunhofer.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58168

--- Comment #5 from André Schneider  ---
(In reply to Eric Botcazou from comment #4)
> ...
> so I'd try to download and compile a recent version of GNU binutils.

Thanks, I will restart the installation using the binutils c++filt
on both Solaris 10 and 11 platform. /André

[Bug tree-optimization/58006] [4.8/4.9 Regression] ICE compiling VegaStrike with -ffast-math -ftree-parallelize-loops=2

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58006

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |4.8.2


[Bug fortran/58099] [4.8/4.9 Regression] [F03] over-zealous procedure-pointer error checking

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58099

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |4.8.2


[Bug tree-optimization/58006] [4.8/4.9 Regression] ICE compiling VegaStrike with -ffast-math -ftree-parallelize-loops=2

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58006

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #8 from Jakub Jelinek  ---
Created attachment 30666
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30666&action=edit
gcc49-pr58006.patch

Untested fix.


[Bug debug/58123] [4.8/4.9 Regression] debug line not tracked for last autovariable dtor

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58123

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
The dtors contain no lineno, they get it from the corresponding try during eh
pass.


[Bug fortran/57798] [4.8/4.9 Regression] Incorrect handling of sum over first dimension of a product of automatic arrays

2013-08-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57798

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |4.8.2


[Bug fortran/58175] New: Incorrect warning message on scalar finalizor

2013-08-16 Thread abensonca at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

Bug ID: 58175
   Summary: Incorrect warning message on scalar finalizor
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: abensonca at gmail dot com

With gfortran 4.9.0 (r201776) the following causes an incorrect warning message
to be issued:

module ct
  type :: a
   contains
 final :: aD
  end type a
contains
  subroutine aD(self)
type(a), intent(inout) :: self
  end subroutine aD
end module ct
program test
  use ct
end program test

$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/abenson/Galacticus/Tools/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/home/abenson/Galacticus/Tools
--enable-languages=c,c++,fortran --disable-multilib
--with-gmp=/home/abenson/Galacticus/Tools
Thread model: posix
gcc version 4.9.0 20130815 (experimental) (GCC) 

$ gfortran -c bug1.F90 -o bug1.o -Wall
bug1.F90:12.6:

  use ct
  1
Warning: Only array FINAL procedures declared for derived type 'a' defined at
(1), suggest also scalar one
bug1.F90:7.20:

  subroutine aD(self)
1
Warning: Unused dummy argument 'self' at (1)

Only a scalar finalizor is present, but the warning suggests that an array but
no scalar finalizor is present.

The warning is only issued if the "ct" module is USEd.

Adding an array finalizor or making the scalar finalizor ELEMENTAL does not
change the warning message.


[Bug target/58160] Power8 fusion support has a bug that shows up in running spec 2006

2013-08-16 Thread meissner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58160

Michael Meissner  changed:

   What|Removed |Added

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

--- Comment #4 from Michael Meissner  ---
Fixed in subversion id 201792.


[Bug fortran/58175] Incorrect warning message on scalar finalizor

2013-08-16 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

Tobias Burnus  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-08-16
 CC||burnus at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Tobias Burnus  ---
Untested patch.

(The second part just makes use of the following existing line:
  my_rank = (arg->as ? arg->as->rank : 0);  )

diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 067288d..28321bb 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -11124,6 +11124,9 @@ gfc_resolve_finalizers (gfc_symbol* derived)
   /* Skip this finalizer if we already resolved it.  */
   if (list->proc_tree)
{
+  if (list->proc_tree->n.sym->formal->sym->as == NULL
+  || list->proc_tree->n.sym->formal->sym->as->rank == 0)
+   seen_scalar = true;
  prev_link = &(list->next);
  continue;
}
@@ -11217,7 +11220,7 @@ gfc_resolve_finalizers (gfc_symbol* derived)
}

/* Is this the/a scalar finalizer procedure?  */
-   if (!arg->as || arg->as->rank == 0)
+   if (my_rank == 0)
  seen_scalar = true;

/* Find the symtree for this procedure.  */


[Bug c++/58176] New: ICE in output_constant, at varasm.c:4658

2013-08-16 Thread mralert at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58176

Bug ID: 58176
   Summary: ICE in output_constant, at varasm.c:4658
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mralert at gmail dot com

Code:
// Nil
struct nil_ { constexpr nil_ () {} };
constexpr nil_ nil;

// Cons
template 
struct cons_ {
using head_ = H;
using tail_ = T;

H head;
T tail;

constexpr cons_() {}
constexpr cons_(H const &h, T const &t) : head(h), tail(t) {}
};
template 
constexpr cons_ cons (H const &h, T const &t = nil) { return
cons_(h,t); }

// List
template  struct list_s;
template 
struct list_s {
using type = cons_::type>;
};
template <>
struct list_s<> {
using type = nil_;
};
template 
using list_ = typename list_s::type;
constexpr nil_ list () { return nil; }
template 
constexpr list_ list (H h, T... t) { return cons(h, list(t...)); }

constexpr auto l1 = list("monkey", 123.4, cons(1, 2), nullptr);

Error when compiled with g++ -std=c++11 -c gccbug.cpp:
gccbug.cpp:36:63: internal compiler error: in output_constant, at varasm.c:4658
 constexpr auto l1 = list("monkey", 123.4, cons(1, 2), nullptr);
   ^

Removing nullptr from the list, or enabling optimizations stops the error from
happening.

gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-4.8-20130725/configure
--prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl
--disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default
--enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu
--disable-install-libiberty --enable-multilib --disable-libssp --disable-werror
--enable-checking=release
Thread model: posix
gcc version 4.8.1 20130725 (prerelease) (GCC)


[Bug fortran/58177] New: Incorrect warning message about unused PRIVATE module variable

2013-08-16 Thread abensonca at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58177

Bug ID: 58177
   Summary: Incorrect warning message about unused PRIVATE module
variable
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: abensonca at gmail dot com

With gfortran 4.9.0 (r201758) the following incorrectly reports than the
variable "m" in module "b" is unused:

module a
  logical :: m
end module a
module b
  logical, private :: m
contains
  subroutine bb()
use a
m=.true.
  end subroutine bb
end module b

$ gfortran -v   
Using built-in specs.   
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/abenson/Galacticus/Tools/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
 
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/home/abenson/Galacticus/Tools
--enable-languages=c,c++,fortran --disable-multilib
--with-gmp=/home/abenson/Galacticus/Tools   
Thread model: posix 
gcc version 4.9.0 20130815 (experimental) (GCC) 
$ gfortran -c bug.F90 -o bug.o -Wall
bug.F90:5.23:   

  logical, private :: m 
   1
Warning: Unused PRIVATE module variable 'm' declared at (1)

The variable "m" in module "b" is used. The problem seems to be related to the
presence of a PUBLIC variable with the same name in another USEd module.
Changing the name of the variable in the USEd module makes the warning go away.
Renaming the imported variable with:

use a, only : mm => m

results in a correct warning:

Warning: Unused module variable 'm' which has been explicitly imported at (1)

and causes the "Unused PRIVATE" warning to go away.


[Bug c++/58178] New: variant function name was used for user defined constructor

2013-08-16 Thread chihin.ko at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58178

Bug ID: 58178
   Summary: variant function name was used for user defined
constructor
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chihin.ko at oracle dot com

test case:
cat t.cc

#include 
struct base {
   int x;
   base() { x= 2;};
};

struct A {
static int x;
struct B :base{
void f() {
x++;
printf("x= %d\n",x);
}
};
};

 int A::x = 12;

 main()
 {
 A::B z;
 z.f();
 }
/pkg/gnu/bin/g++  -R/pkg/gnu/lib -R/pkg/gnu/lib/amd64 -g t.cc

mandelstam.us.oracle.com 2528> nm a.out | grep base
[95]| 134548914|14|FUNC |WEAK |0|11 |_ZN4baseC2Ev

base class has user defined constructor, I'm expecting _ZN4baseC1Ev from nm
dump


[Bug middle-end/58179] New: [4.9 Regression] obj_type_ref ICE building libobjc

2013-08-16 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58179

Bug ID: 58179
   Summary: [4.9 Regression] obj_type_ref ICE building libobjc
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dje at gcc dot gnu.org

/nasfarm/edelsohn/src/src/libobjc/accessors.m: In function 'objc_getProperty':
/nasfarm/edelsohn/src/src/libobjc/accessors.m:127:11: internal compiler error:
in obj_type_ref_class, at tree.c:11876
result = RETAIN (*(pointer_to_ivar));


[Bug middle-end/58179] [4.9 Regression] obj_type_ref ICE building libobjc

2013-08-16 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58179

David Edelsohn  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-08-17
 CC||hubicka at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from David Edelsohn  ---
Confirmed.