[Bug c++/52973] [4.7/4.8 Regression] visibility attribute for class is not passed to its members

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52973

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #5 from Jason Merrill  2012-06-02 
04:06:08 UTC ---
Fixed for 4.7.1.


[Bug c++/52973] [4.7/4.8 Regression] visibility attribute for class is not passed to its members

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52973

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Jason Merrill  2012-06-02 
04:05:34 UTC ---
Author: jason
Date: Sat Jun  2 04:05:25 2012
New Revision: 188138

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188138
Log:
PR c++/52973
* parser.c (cp_parser_class_head): Apply attributes here.
* semantics.c (begin_class_definition): Not here.
* cp-tree.h: Adjust.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/ext/visibility/template12.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/cp-tree.h
branches/gcc-4_7-branch/gcc/cp/parser.c
branches/gcc-4_7-branch/gcc/cp/semantics.c
branches/gcc-4_7-branch/gcc/objcp/objcp-decl.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/ext/attrib14.C

--- Comment #5 from Jason Merrill  2012-06-02 
04:06:08 UTC ---
Fixed for 4.7.1.


[Bug c++/52973] [4.7/4.8 Regression] visibility attribute for class is not passed to its members

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52973

--- Comment #4 from Jason Merrill  2012-06-02 
04:05:34 UTC ---
Author: jason
Date: Sat Jun  2 04:05:25 2012
New Revision: 188138

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188138
Log:
PR c++/52973
* parser.c (cp_parser_class_head): Apply attributes here.
* semantics.c (begin_class_definition): Not here.
* cp-tree.h: Adjust.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/ext/visibility/template12.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/cp-tree.h
branches/gcc-4_7-branch/gcc/cp/parser.c
branches/gcc-4_7-branch/gcc/cp/semantics.c
branches/gcc-4_7-branch/gcc/objcp/objcp-decl.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/ext/attrib14.C


[Bug c++/52973] [4.7/4.8 Regression] visibility attribute for class is not passed to its members

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52973

--- Comment #3 from Jason Merrill  2012-06-02 
04:03:57 UTC ---
Author: jason
Date: Sat Jun  2 04:03:51 2012
New Revision: 188137

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188137
Log:
PR c++/52973
* parser.c (cp_parser_class_head): Apply attributes here.
* semantics.c (begin_class_definition): Not here.
* cp-tree.h: Adjust.

Added:
trunk/gcc/testsuite/g++.dg/ext/visibility/template12.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/parser.c
trunk/gcc/cp/semantics.c
trunk/gcc/objcp/ChangeLog
trunk/gcc/objcp/objcp-decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ext/attrib14.C


[Bug libstdc++/53561] [c++0x] regex_replace is missing overloads

2012-06-01 Thread luto at mit dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53561

Andy Lutomirski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #1 from Andy Lutomirski  2012-06-02 02:09:16 
UTC ---
Never mind.  I just saw that the implementation isn't supposed to be done.


[Bug libstdc++/53561] New: [c++0x] regex_replace is missing overloads

2012-06-01 Thread luto at mit dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53561

 Bug #: 53561
   Summary: [c++0x] regex_replace is missing overloads
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: l...@mit.edu


[re.alg.replace] says:

template 
basic_string
regex_replace(const basic_string& s,
const basic_regex& e,
const charT* fmt,
regex_constants::match_flag_type flags =
regex_constants::match_default);

This doesn't compile, though:

#include 
#include 

int main()
{
  std::regex_replace, char>(std::string("x"),
std::regex("x"), "y");  // works

  std::regex_replace(std::string("x"), std::regex("x"), "y");  // fails

  return 0;
}

The string,regex,string,flags overload doesn't work because the arguments
aren't an exact match.


[Bug c++/53491] [4.7 Regression] ICE in build_target_expr_with_type, at cp/tree.c:587

2012-06-01 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53491

Andrew Pinski  changed:

   What|Removed |Added

 CC||g++bug at oxyware dot com

--- Comment #9 from Andrew Pinski  2012-06-01 
23:30:07 UTC ---
*** Bug 53560 has been marked as a duplicate of this bug. ***


[Bug c++/53560] Internal compiler error with += and void function (invalid source)

2012-06-01 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53560

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #1 from Andrew Pinski  2012-06-01 
23:30:07 UTC ---
This was just fixed for 4.7.1 and the trunk; three days ago.

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


[Bug c++/53560] New: Internal compiler error with += and void function (invalid source)

2012-06-01 Thread g++bug at oxyware dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53560

 Bug #: 53560
   Summary: Internal compiler error with += and void function
(invalid source)
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: g++...@oxyware.com


void f() {}

int main()
{
   int i = 0;
   i += f();
}

This is an invalid C++ program but it causes an internal compiler error (see
below).

g++ -v -save-temps -c  gives:

Using built-in specs.
COLLECT_GCC=/usr/local/bin/g++
Target: x86_64-unknown-linux-gnu
Configured with: ./configure
Thread model: posix
gcc version 4.7.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1plus -E -quiet -v
-D_GNU_SOURCE argc.cpp -mtune=generic -march=x86-64 -fpch-preprocess -o argc.ii
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-unknown-linux-gnu

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include
 /usr/local/include
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1plus -fpreprocessed
argc.ii -quiet -dumpbase argc.cpp -mtune=generic -march=x86-64 -auxbase argc
-version -o argc.s
GNU C++ (GCC) version 4.7.0 (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.7.0, GMP version 4.3.1, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.7.0 (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.7.0, GMP version 4.3.1, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 635960e7261d0cad01689b56d992ea9a
argc.cpp: In function ‘int main()’:
argc.cpp:6:11: internal compiler error: in build_target_expr_with_type, at
cp/tree.c:587
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


[Bug c++/52973] [4.7/4.8 Regression] visibility attribute for class is not passed to its members

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52973

--- Comment #2 from Jason Merrill  2012-06-01 
21:36:35 UTC ---
The bug here is that we aren't applying the visibility attribute to b until
after we've decided that a is hidden because b is hidden.  Changing the code
to

template  class __attribute__((visibility("default"))) a
{
public:
  /* A */ static int c;
};

class __attribute__((visibility("default"))) b;
class b: a  {};

template<> /* B */ int a::c = 0;

works around the issue.


[Bug c++/52973] [4.7/4.8 Regression] visibility attribute for class is not passed to its members

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52973

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-06-01
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1


[Bug c++/52725] [4.7/4.8 Regression] error: "capture of non-variable" for new-expression incorrectly parsed as lambda-expression

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52725

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #9 from Jason Merrill  2012-06-01 
21:19:42 UTC ---
Author: jason
Date: Fri Jun  1 21:19:36 2012
New Revision: 188128

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188128
Log:
PR c++/52725
* parser.c (cp_parser_binary_expression): Bail early if we're parsing
tentatively and the LHS has a parse error.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/parse/new6.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/parser.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
   
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/template/sizeof-template-argument.C

--- Comment #10 from Jason Merrill  2012-06-01 
21:20:19 UTC ---
Fixed for 4.7.1.


[Bug c++/52725] [4.7/4.8 Regression] error: "capture of non-variable" for new-expression incorrectly parsed as lambda-expression

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52725

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #8 from Jason Merrill  2012-06-01 
21:19:26 UTC ---
Author: jason
Date: Fri Jun  1 21:19:22 2012
New Revision: 188127

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188127
Log:
PR c++/52725
* parser.c (cp_parser_binary_expression): Bail early if we're parsing
tentatively and the LHS has a parse error.

Added:
trunk/gcc/testsuite/g++.dg/parse/new6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/template/sizeof-template-argument.C

--- Comment #9 from Jason Merrill  2012-06-01 
21:19:42 UTC ---
Author: jason
Date: Fri Jun  1 21:19:36 2012
New Revision: 188128

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188128
Log:
PR c++/52725
* parser.c (cp_parser_binary_expression): Bail early if we're parsing
tentatively and the LHS has a parse error.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/parse/new6.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/parser.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
   
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/template/sizeof-template-argument.C

--- Comment #10 from Jason Merrill  2012-06-01 
21:20:19 UTC ---
Fixed for 4.7.1.


[Bug c++/52725] [4.7/4.8 Regression] error: "capture of non-variable" for new-expression incorrectly parsed as lambda-expression

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52725

--- Comment #8 from Jason Merrill  2012-06-01 
21:19:26 UTC ---
Author: jason
Date: Fri Jun  1 21:19:22 2012
New Revision: 188127

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188127
Log:
PR c++/52725
* parser.c (cp_parser_binary_expression): Bail early if we're parsing
tentatively and the LHS has a parse error.

Added:
trunk/gcc/testsuite/g++.dg/parse/new6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/template/sizeof-template-argument.C

--- Comment #9 from Jason Merrill  2012-06-01 
21:19:42 UTC ---
Author: jason
Date: Fri Jun  1 21:19:36 2012
New Revision: 188128

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188128
Log:
PR c++/52725
* parser.c (cp_parser_binary_expression): Bail early if we're parsing
tentatively and the LHS has a parse error.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/parse/new6.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/parser.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
   
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/template/sizeof-template-argument.C


[Bug c++/52725] [4.7/4.8 Regression] error: "capture of non-variable" for new-expression incorrectly parsed as lambda-expression

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52725

--- Comment #8 from Jason Merrill  2012-06-01 
21:19:26 UTC ---
Author: jason
Date: Fri Jun  1 21:19:22 2012
New Revision: 188127

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188127
Log:
PR c++/52725
* parser.c (cp_parser_binary_expression): Bail early if we're parsing
tentatively and the LHS has a parse error.

Added:
trunk/gcc/testsuite/g++.dg/parse/new6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/template/sizeof-template-argument.C


[Bug c/48968] incorrect warning about longjmp/vfork clobbering a local (-W -O2, x86-64)

2012-06-01 Thread eggert at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48968

--- Comment #7 from eggert at gnu dot org 2012-06-01 21:19:16 UTC ---
Created attachment 27546
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27546
alternate test case, for x86, showing "({anonymous}) might be clobbered"

By compiling on x86 (as opposed to x86-64) and tweaking the source code a bit I
got a different diagnostic "error: variable '({anonymous})' might be clobbered
by 'longjmp' or 'vfork'" which may help indicate where the problem is. 
Uncompress and compile the attached program with:

gcc -v -m32 -std=gnu99 -c -Werror=clobbered -g -O2 t.i

and the output is:

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7.0/configure
--prefix=/home/eggert/opt/Linux-x86_64/gcc-4.7.0 --disable-nls
Thread model: posix
gcc version 4.7.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-m32' '-std=gnu99' '-c' '-Werror=clobbered' '-g'
'-O2' '-mtune=generic' '-march=x86-64'

/home/eggert/opt/Linux-x86_64/gcc-4.7.0/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1
-fpreprocessed t.i -quiet -dumpbase t.i -m32 -mtune=generic -march=x86-64
-auxbase t -g -O2 -Werror=clobbered -std=gnu99 -version -o /tmp/cc9OhgtR.s
GNU C (GCC) version 4.7.0 (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.7.0, GMP version 4.3.2, MPFR version 3.0.0, MPC
version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.7.0 (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.7.0, GMP version 4.3.2, MPFR version 3.0.0, MPC
version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 0b542ccc033bf565e8473ef2771f60ec
t.i: In function 'read_char':
t.i:14930:1: error: variable '({anonymous})' might be clobbered by 'longjmp' or
'vfork' [-Werror=clobbered]
t.i:14930:1: error: variable '({anonymous})' might be clobbered by 'longjmp' or
'vfork' [-Werror=clobbered]
t.i:14930:1: error: variable '({anonymous})' might be clobbered by 'longjmp' or
'vfork' [-Werror=clobbered]
t.i:14930:1: error: variable '({anonymous})' might be clobbered by 'longjmp' or
'vfork' [-Werror=clobbered]
cc1: some warnings being treated as errors


[Bug fortran/53521] [4.5/4.6/4.7/4.8 Regression] Memory leak with zero-sized array constructor

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53521

Tobias Burnus  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|4.6.4   |4.5.4
Summary|[4.5/4.6/4.7 Regression]|[4.5/4.6/4.7/4.8
   |Memory leak with zero-sized |Regression] Memory leak
   |array constructor   |with zero-sized array
   ||constructor
  Known to fail||4.8.0

--- Comment #14 from Tobias Burnus  2012-06-01 
21:07:49 UTC ---
FIXED on the trunk and on all still maintained branches: 4.5, 4.6 and 4.7.


(In reply to comment #10)
> this fixes the issue I saw for CP2K. From some further tests I
> did, I couldn't see any negative side effects.

Good to hear.

> I had a look at other gcc branches, the patch applies flawlessly to 4.7 and 
> 4.6
> (I did not have a 4.5 branch around).

The patch didn't apply directly to 4.5, but replicating the code manually was
very simple.

> I would be very happy to see it integrated in 4.7.1 and 4.6.4,

Note that 4.7.1 will be released soon; I think release-candidate build is due
next week.


[Bug target/45844] FAIL: gfortran.dg/vect/pr45714-b.f -O (internal compiler error)

2012-06-01 Thread dougkwan at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45844

--- Comment #10 from dougkwan at gcc dot gnu.org 2012-06-01 20:43:37 UTC ---
Author: dougkwan
Date: Fri Jun  1 20:43:31 2012
New Revision: 188126

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188126
Log:
2012-06-01   Doug Kwan  

Backport r171031 from upstream trunk.
2011-03-16  Alan Modra  

PR target/45844
* config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
Don't create invalid offset address for vsx splat insn.
* config/rs6000/predicates.md (splat_input_operand): New.
* config/rs6000/vsx.md (vsx_splat_*): Use it.

* contrib/testsuite-management/powerpc64-grtev2-linux-gnu.xfail:
Remove expected failures because now the bug is fixed.

Modified:
branches/google/gcc-4_6/ChangeLog.google-4_6
   
branches/google/gcc-4_6/contrib/testsuite-management/powerpc64-grtev2-linux-gnu.xfail
branches/google/gcc-4_6/gcc/ChangeLog.google-4_6
branches/google/gcc-4_6/gcc/config/rs6000/predicates.md
branches/google/gcc-4_6/gcc/config/rs6000/rs6000.c
branches/google/gcc-4_6/gcc/config/rs6000/vsx.md


[Bug c/48968] incorrect warning about longjmp/vfork clobbering a local (-W -O2, x86-64)

2012-06-01 Thread eggert at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48968

eggert at gnu dot org changed:

   What|Removed |Added

Version|4.6.0   |4.7.0

--- Comment #6 from eggert at gnu dot org 2012-06-01 20:42:42 UTC ---
I just now ran into the bug again when compiling a new Emacs version and so am
following up.

The function read_char_minibuf_menu_prompt does not call setjmp.  Apparently
GCC is inlining the function into some other place and then complaining that
the result is unsafe, but this sort of inlining would be incorrect if it
actually made the code unsafe, so the diagnostic is either incorrect, or (if
correct) indicates the possibility that the wrong code has been generated. I
have verified that the problem is still there with GCC 4.7.0 and so I'll try to
change the version number in this bug report.


[Bug fortran/53521] [4.5/4.6/4.7 Regression] Memory leak with zero-sized array constructor

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53521

--- Comment #13 from Tobias Burnus  2012-06-01 
20:40:45 UTC ---
Author: burnus
Date: Fri Jun  1 20:40:36 2012
New Revision: 188125

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188125
Log:
2012-06-01  Tobias Burnus  

PR fortran/53521
* trans.c (gfc_deallocate_scalar_with_status): Properly
handle the case size == 0.


Modified:
branches/gcc-4_5-branch/gcc/fortran/ChangeLog
branches/gcc-4_5-branch/gcc/fortran/trans.c


[Bug fortran/53521] [4.5/4.6/4.7 Regression] Memory leak with zero-sized array constructor

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53521

--- Comment #12 from Tobias Burnus  2012-06-01 
20:06:45 UTC ---
Author: burnus
Date: Fri Jun  1 20:06:39 2012
New Revision: 188124

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188124
Log:
2012-06-01  Tobias Burnus  

PR fortran/53521
* trans.c (gfc_deallocate_scalar_with_status): Properly
handle the case size == 0.


Modified:
branches/gcc-4_6-branch/gcc/fortran/ChangeLog
branches/gcc-4_6-branch/gcc/fortran/trans.c


[Bug target/53559] ICE on altivec builtins stv[l|r]x[l]

2012-06-01 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53559

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Target||powerpc

--- Comment #1 from Andrew Pinski  2012-06-01 
19:49:35 UTC ---
Hmm,
  This was working correctly when I implemented the support for these.
I did add a few testcases for this too.

Anyways I think your patch is correct.


[Bug target/53559] New: ICE on altivec builtins stv[l|r]x[l]

2012-06-01 Thread edmar at freescale dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53559

 Bug #: 53559
   Summary: ICE on altivec builtins stv[l|r]x[l]
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ed...@freescale.com


Created attachment 27545
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27545
config/rs6000/altivec.md (altivec_stvlx): Change machine mode of operands.

When compiling any code that uses __builtin_altivec_stvlx
I get an ICE:

test.c: In function ‘sc1’:
test.c:7:27: internal compiler error: in copy_to_mode_reg, at explow.c:647
   __builtin_altivec_stvlx (v,a,p);
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Test case is:
// -O2 -maltivec -mcpu=cell -c
#include 

typedef __vector signed char vsc;
void sc1(vsc v, long a, void *p)
{
  __builtin_altivec_stvlx (v,a,p);
}


Compiled with:
gcc  -O2 -maltivec -mcpu=cell -c test.c
Target:
ppc64

I traced that ICE back as far as gcc-4.4.4
(Fedora 12 running on a G5:
Using built-in specs.
Target: ppc64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --enable-secureplt --with-long-double-128
--build=ppc64-redhat-linux --target=ppc64-redhat-linux --with-cpu=default32
Thread model: posix
gcc version 4.4.4 20100630 (Red Hat 4.4.4-10) (GCC) )




I found that the RTL for the builtin is created with mode V16QI,
but the RTL patterns in altivec.md are defined with mode V4SI.

The patch attached was tested 3 months ago on branches 4.5, 4.6,
4.7 and on trunk (4.8) with no regressions.

Please let me know if the proposed solution is the right way
to fix this. I will re-test the patch and submit it for approval.

Thanks,
Edmar


[Bug rtl-optimization/53558] New: Register allocator doesn't tie return value register to output variable.

2012-06-01 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53558

 Bug #: 53558
   Summary: Register allocator doesn't tie return value register
to output variable.
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ram...@gcc.gnu.org


Given the testcase below GCC generates extra moves to return value registers on
ARM v7-a linux-gnueabi . Disabling the smax insn pattern or the "generic" 3
operand condition move to doesn't really help 

This also appears to be a problem on other architectures given the register
allocator fails to merge the copy of the result value in to the result  .The
*arm_smax_insn pattern looks like the following. Debuggging the register
allocator showed that param 0,1, and 2 are in r1, r2 and r0 . However there is
probably an easier fit with r0, r2 and r0 given r0 and r2 die as well in this
instruction. I might be missing something here. 

(define_insn "*arm_smax_insn"
  [(set (match_operand:SI  0 "s_register_operand" "=r,r")
(smax:SI (match_operand:SI 1 "s_register_operand"  "%0,?r")
 (match_operand:SI 2 "arm_rhs_operand""rI,rI")))
   (clobber (reg:CC CC_REGNUM))]
  "TARGET_ARM"
  "@
   cmp\\t%1, %2\;movlt\\t%0, %2
   cmp\\t%1, %2\;movge\\t%0, %1\;movlt\\t%0, %2"
  [(set_attr "conds" "clob")
   (set_attr "length" "8,12")]
)






typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
typedef unsigned long uintptr_t;
typedef unsigned short uint16_t;
void f2(char *d, char const *s, int flags)
{
  uint32_t tmp0, tmp1;

  if (flags & 1)
tmp0 = *s++;

  if (flags & 2)
{
  uint16_t *ss = (void *)s;
  tmp1 = *ss++;
  s = (void *)ss;
}

  if (flags & 1)
*d++ = tmp0;

  if (flags & 2)
{
  uint16_t *dd = (void *)d;
  *dd++ = tmp1;
  d = (void *)dd;
}
}


[Bug c++/53137] [4.7/4.8 Regression] g++ segfault

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53137

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #5 from Jason Merrill  2012-06-01 
18:47:13 UTC ---
Fixed for 4.7.1.


[Bug c++/53484] [4.7/4.8 Regression] [c++11] Wrong auto in lambdas in function templates

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53484

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Jason Merrill  2012-06-01 
18:44:57 UTC ---
Fixed for 4.7.1.


[Bug c++/53137] [4.7/4.8 Regression] g++ segfault

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53137

--- Comment #4 from Jason Merrill  2012-06-01 
18:43:39 UTC ---
Author: jason
Date: Fri Jun  1 18:43:34 2012
New Revision: 188123

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188123
Log:
PR c++/53137
* pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
(instantiate_decl): Don't push_to_top_level for local class methods.
(instantiate_class_template_1): Or for local classes.

Added:
   
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template5.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/pt.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug c++/53484] [4.7/4.8 Regression] [c++11] Wrong auto in lambdas in function templates

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53484

--- Comment #3 from Jason Merrill  2012-06-01 
18:43:30 UTC ---
Author: jason
Date: Fri Jun  1 18:43:23 2012
New Revision: 188122

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188122
Log:
PR c++/53484
* pt.c (do_auto_deduction): Don't try to deduce from a
type-dependent initializer.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/auto33.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/pt.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug fortran/53552] Add support for !GCC$ warning directive (cf. #pragma warning)

2012-06-01 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53552

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #1 from Manuel López-Ibáñez  2012-06-01 
18:40:44 UTC ---
Wouldn't it be better to make Fortran use the common GCC diagnostics machinery?
Now that there is caret information, what feature is missing? And you will also
fix PR44054. And there will be more code shared, which is a very good thing!


[Bug fortran/53526] [Coarray] (lib) Properly handle MOVE_ALLOC for coarrays

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53526

--- Comment #2 from Tobias Burnus  2012-06-01 
17:54:42 UTC ---
MOVE_ALLOC - following the current interpretation request - seems to be more
complicated that I had imagined:

It's unclear to me whether the users have to invoke it on all images (like
allocate/deallocate) or not. If not, one gets into all kind of issues. See:
http://j3-fortran.org/pipermail/j3/2012-June/005312.html

Assuming that the user has to call it on all images, the current patches are:
- check.c: http://gcc.gnu.org/ml/fortran/2012-05/msg00171.html
- trans-intrinsic.c: http://gcc.gnu.org/ml/fortran/2012-05/msg00173.html

In the latter, the SYNC ALL should be replaced by SYNC MEMORY, which is all
what is implied by an image control statement. (It cannot be nothing as some
changes before MOVE_ALLOC might have to be flushed.) Or might might remain SYNC
ALL - which is required to avoid inconsistency issues [assuming that it has to
be called on all images].


[Bug tree-optimization/53501] [4.5/4.6 Regression] scev introduces signed overflow

2012-06-01 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53501

--- Comment #8 from Eric Botcazou  2012-06-01 
17:03:27 UTC ---
Author: ebotcazou
Date: Fri Jun  1 17:03:19 2012
New Revision: 188119

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188119
Log:
PR middle-end/53501
* fold-const.c (fold_binary_loc): Refine previous change.
testsuite/
* c-c++-common/restrict-2.c: Revert previous change.

Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/fold-const.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/c-c++-common/restrict-2.c


[Bug c++/52725] [4.7/4.8 Regression] error: "capture of non-variable" for new-expression incorrectly parsed as lambda-expression

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52725

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |


[Bug tree-optimization/53501] [4.5/4.6 Regression] scev introduces signed overflow

2012-06-01 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53501

--- Comment #7 from Eric Botcazou  2012-06-01 
17:01:22 UTC ---
Author: ebotcazou
Date: Fri Jun  1 17:01:17 2012
New Revision: 188118

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188118
Log:
PR middle-end/53501
* fold-const.c (fold_binary_loc): Refine previous change.
testsuite/
* c-c++-common/restrict-2.c: Revert previous change.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/restrict-2.c


[Bug target/53443] Bad Macro Definition SUBSUBTARGET_OVERRIDE_OPTIONS in vxworks.h

2012-06-01 Thread rbmj at verizon dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53443

rbmj at verizon dot net changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #1 from rbmj at verizon dot net 2012-06-01 16:59:20 UTC ---
Fixed in r188114


[Bug c++/53137] [4.7/4.8 Regression] g++ segfault

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53137

--- Comment #3 from Jason Merrill  2012-06-01 
16:55:21 UTC ---
Author: jason
Date: Fri Jun  1 16:55:17 2012
New Revision: 188117

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188117
Log:
PR c++/53137
* pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
(instantiate_decl): Don't push_to_top_level for local class methods.
(instantiate_class_template_1): Or for local classes.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template5.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/53484] [4.7/4.8 Regression] [c++11] Wrong auto in lambdas in function templates

2012-06-01 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53484

--- Comment #2 from Jason Merrill  2012-06-01 
16:55:15 UTC ---
Author: jason
Date: Fri Jun  1 16:55:08 2012
New Revision: 188116

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188116
Log:
PR c++/53484
* pt.c (do_auto_deduction): Don't try to deduce from a
type-dependent initializer.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/auto33.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog


[Bug rtl-optimization/51771] trans-mem: abnormal edges get lost or corrupted

2012-06-01 Thread aldyh at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51771

Aldy Hernandez  changed:

   What|Removed |Added

   Priority|P3  |P4
   Severity|normal  |enhancement


[Bug target/53557] New: Cross compiling for m68k-linux fails as doesn't exist

2012-06-01 Thread dan at danny dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53557

 Bug #: 53557
   Summary: Cross compiling for m68k-linux fails as 
doesn't exist
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: d...@danny.cz


Created attachment 27544
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27544
fix cross build

Cross compiling for m68k-linux fails as  doesn't exist, although
a fallback solution exists in libgcc/config/m68k/linux-atomic.c

I will attach more information including the logs later.


[Bug rtl-optimization/51771] trans-mem: abnormal edges get lost or corrupted

2012-06-01 Thread aldyh at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51771

--- Comment #6 from Aldy Hernandez  2012-06-01 
16:46:27 UTC ---
Created attachment 27543
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27543
Proposed patch by Richard Henderson-- untested

This is an old, untested patch from rth that attempts to fix the problem
without the returns-twice hack.  There is some overlap with Patrick Marlier's
attempt here:

http://gcc.gnu.org/ml/gcc/2012-01/msg00099.html

Patch provided here so we don't have to reanalyze everything if/when we revisit
this issue.


[Bug rtl-optimization/51771] trans-mem: abnormal edges get lost or corrupted

2012-06-01 Thread aldyh at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51771

Aldy Hernandez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-06-01
 Ever Confirmed|0   |1

--- Comment #5 from Aldy Hernandez  2012-06-01 
16:39:12 UTC ---
This is a mental note for whenever we decide to pick this up again...

The current approach with the returns-twice patch is a bit heavy handed, as the
register allocator will more-or-less give up across returns-twice.  With the
appropriate abnormal edges, the allocator will get more exact info.  Whether or
not it's able to do anything extra with this info is a different story... 
That's why, we should drop this to ultra low priority-- the returns-twice
approach is good enough.

However, when someone gets bored, the way to debug this is with any trivial
testcase:

  int glob;
  foo()
  {
__transaction_atomic { glob=666; }
  }

If one reverts the returns-twice patch referenced in this PR, one sees the
abnormal edges all the way up to *.c.*t.optimized.  The edges get corrupted
somewhere in the RTL passes.


[Bug target/44553] Cross compiling for ia64 fails as stdlib.h doesn't exist

2012-06-01 Thread dan at danny dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44553

Dan Horák  changed:

   What|Removed |Added

 CC||dan at danny dot cz

--- Comment #4 from Dan Horák  2012-06-01 16:16:12 UTC ---
and still present in 4.7.0, please, please, fix it :-)


[Bug c++/26155] ICE after error with namespace alias

2012-06-01 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26155

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #8 from Paolo Carlini  2012-06-01 
16:13:03 UTC ---
Fixed.


[Bug c++/26155] ICE after error with namespace alias

2012-06-01 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26155

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #7 from paolo at gcc dot gnu.org  
2012-06-01 16:11:44 UTC ---
Author: paolo
Date: Fri Jun  1 16:11:38 2012
New Revision: 188113

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188113
Log:
/cp
2012-06-01  Paolo Carlini  

PR c++/26155
* name-lookup.c (push_namespace): When error recovery is
impossible just error out in duplicate_decls.

/testsuite
2012-06-01  Paolo Carlini  

PR c++/26155
* g++.dg/parse/namespace-alias-1.C: New.

Added:
trunk/gcc/testsuite/g++.dg/parse/namespace-alias-1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/ChangeLog

--- Comment #8 from Paolo Carlini  2012-06-01 
16:13:03 UTC ---
Fixed.


[Bug c++/26155] ICE after error with namespace alias

2012-06-01 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26155

--- Comment #7 from paolo at gcc dot gnu.org  
2012-06-01 16:11:44 UTC ---
Author: paolo
Date: Fri Jun  1 16:11:38 2012
New Revision: 188113

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188113
Log:
/cp
2012-06-01  Paolo Carlini  

PR c++/26155
* name-lookup.c (push_namespace): When error recovery is
impossible just error out in duplicate_decls.

/testsuite
2012-06-01  Paolo Carlini  

PR c++/26155
* g++.dg/parse/namespace-alias-1.C: New.

Added:
trunk/gcc/testsuite/g++.dg/parse/namespace-alias-1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/53553] misleading locations for error in initializers

2012-06-01 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53553

--- Comment #1 from Jonathan Wakely  2012-06-01 
15:43:59 UTC ---
I think this is a duplicate of an old bug, but the carets do make it more
noticeable


[Bug fortran/53521] [4.5/4.6/4.7 Regression] Memory leak with zero-sized array constructor

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53521

--- Comment #11 from Tobias Burnus  2012-06-01 
15:08:29 UTC ---
Author: burnus
Date: Fri Jun  1 15:08:24 2012
New Revision: 188111

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188111
Log:
2012-06-01  Tobias Burnus  

PR fortran/53521
* trans.c (gfc_deallocate_scalar_with_status): Properly
handle the case size == 0.


Modified:
branches/gcc-4_7-branch/gcc/fortran/ChangeLog
branches/gcc-4_7-branch/gcc/fortran/trans.c


[Bug target/40411] -std=c99 does not enable c99 mode in Solaris C library

2012-06-01 Thread gseanmcg at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40411

--- Comment #27 from Sean McGovern  2012-06-01 
14:23:21 UTC ---
I just found out how ugly this can get.

freopen(3C) has different behaviour in the case where the first argument is
NULL depending on if SUSv3 behaviour has been enabled by including
values-xpg6.o and defining _XOPEN_SOURCE = 600.

Here's the prototype from Solaris 10 8/11:
FILE *freopen(const char *filename, const char *mode, FILE *stream);

>From the freopen(3C) manpage:
If filename is a null pointer and the application comforms to SUSv3 (see
standards(5)), the freopen() function attempts to change the mode of the stream
to that specified by mode, as though the name of the file currently associated
with the stream had been used.

<...>

If the filename is a null pointer and the application does not comform to
SUSv3, freopen() returns a null pointer.


[Bug fortran/53556] New: [F03] associated intrinsic does not work with procedure pointers in subroutines

2012-06-01 Thread middag at users dot sourceforge.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53556

 Bug #: 53556
   Summary: [F03] associated intrinsic does not work with
procedure pointers in subroutines
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mid...@users.sourceforge.net


Created attachment 27542
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27542
Test file which shows if it works or not

If you use procedure pointers in a subroutine, the associated intrinsic does
not work. See attached code.

Tested with gcc-4.4.0, gcc-4.5.1, gcc-4.6.1 and gcc-4.7.0 and in all the
associated intrinsic not work.

Intel 12.0.4 does work.

My gcc -v:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.7-20120505/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-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id
--with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold
--enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--with-linker-hash-style=gnu --disable-multilib --disable-libssp
--disable-build-with-cxx --disable-build-poststage1-with-cxx
--enable-checking=release
Thread model: posix
gcc version 4.7.0 20120505 (prerelease) (GCC)


[Bug other/39851] gcc -Q --help=target does not list extensions selected by -march=

2012-06-01 Thread amonakov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39851

Alexander Monakov  changed:

   What|Removed |Added

 CC||kjslag at gmail dot com
 CC||philomath868 at gmail dot
   ||com

--- Comment #2 from Alexander Monakov  2012-06-01 
14:05:12 UTC ---
*** Bug 43718 has been marked as a duplicate of this bug. ***

--- Comment #3 from Alexander Monakov  2012-06-01 
14:06:12 UTC ---
*** Bug 53554 has been marked as a duplicate of this bug. ***


[Bug other/39851] gcc -Q --help=target does not list extensions selected by -march=

2012-06-01 Thread amonakov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39851

Alexander Monakov  changed:

   What|Removed |Added

 CC||kjslag at gmail dot com
 CC||philomath868 at gmail dot
   ||com

--- Comment #2 from Alexander Monakov  2012-06-01 
14:05:12 UTC ---
*** Bug 43718 has been marked as a duplicate of this bug. ***

--- Comment #3 from Alexander Monakov  2012-06-01 
14:06:12 UTC ---
*** Bug 53554 has been marked as a duplicate of this bug. ***


[Bug driver/53554] -Q --help= gives inaccurate target-specific information

2012-06-01 Thread amonakov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53554

Alexander Monakov  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||amonakov at gcc dot gnu.org
 Resolution||DUPLICATE

--- Comment #1 from Alexander Monakov  2012-06-01 
14:06:12 UTC ---
Marking as a duplicate of an earlier bug which is confirmed.

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


[Bug middle-end/43718] march does not display --help=target enable/disable correctly

2012-06-01 Thread amonakov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43718

Alexander Monakov  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||amonakov at gcc dot gnu.org
 Resolution||DUPLICATE

--- Comment #3 from Alexander Monakov  2012-06-01 
14:05:12 UTC ---
Marking as a duplicate of an earlier bug which is confirmed.

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


[Bug bootstrap/53555] [4.8 Regression] Bootstrap failure

2012-06-01 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53555

H.J. Lu  changed:

   What|Removed |Added

 CC||areg.melikadamyan at gmail
   ||dot com, kirill.yukhin at
   ||intel dot com
   Target Milestone|--- |4.8.0

--- Comment #1 from H.J. Lu  2012-06-01 13:44:28 
UTC ---
It may be caused by revision 188107:

http://gcc.gnu.org/ml/gcc-cvs/2012-06/msg00017.html


[Bug bootstrap/53555] New: [4.8 Regression] Bootstrap failure

2012-06-01 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53555

 Bug #: 53555
   Summary: [4.8 Regression] Bootstrap failure
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com


On Linux/ia32, revision 188107 failed to bootstrap when
configured with

../src-trunk/configure \
   --with-arch=core2 --with-cpu=atom --prefix=/usr/local
--enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld
i686-linux --with-fpmath=sse --enable-languages=c,c++,fortran,java,lto,objc

Comparing stages 2 and 3
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/gimple-fold.o differs
gcc/jvspec.o differs
make[5]: *** [compare] Error 1

Revision 188104 is OK.


[Bug driver/53554] New: -Q --help= gives inaccurate target-specific information

2012-06-01 Thread philomath868 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53554

 Bug #: 53554
   Summary: -Q --help= gives inaccurate target-specific
information
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: driver
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: philomath...@gmail.com


some code that sets target-specific defaults isn't run when using the
--help= option, this causes some incorrect information to be displayed.

for example, -fomit-frame-pointer shows as disabled on a x86_64 system with
optimization selected, mfpmath=387 is shown on such a system (where
-mfpmath=sse is the default), and mmx seems to be disabled on a system which
supports it (even when -march=native is specified).
see http://gcc.gnu.org/ml/gcc-help/2012-06/msg6.html .


[Bug target/52971] gcc ICE with an sh64 cross-compilation

2012-06-01 Thread dhowells at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52971

dhowe...@redhat.com  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #2 from dhowells at redhat dot com  
2012-06-01 13:31:06 UTC ---
Those fix it for me.


[Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap

2012-06-01 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433

--- Comment #16 from vincenzo Innocente  
2012-06-01 13:27:55 UTC ---
in case it helps


run -fpreprocessed test.i -O2 -o bha.s
Starting program: /home/data/newsoft/gcc-build/gcc/cc1 -fpreprocessed test.i
-O2 -o bha.s
reading VI .tcshrc
tty
resize: Command not found.
test.i:2:1: warning: data definition has no type or storage class [enabled by
default]
 b;
 ^
 d_demangle_callback
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data>   
Assembling functions:
 d_demangle_callback
Breakpoint 1, int_mode_for_mode (mode=VOIDmode) at
../../gcc-trunk/gcc/stor-layout.c:392
392  switch (GET_MODE_CLASS (mode))
(gdb) where
#0  int_mode_for_mode (mode=VOIDmode) at ../../gcc-trunk/gcc/stor-layout.c:392
#1  0x00c89832 in emit_move_via_integer (mode=VOIDmode,
x=0x76d30c40, y=0x76d30ae0, force=Unhandled dwarf expression opcode
0xf3
) at ../../gcc-trunk/gcc/expr.c:3059
#2  0x0079b116 in emit_move_insn_1 (x=0x76d30c40, y=0x76d30ae0)
at ../../gcc-trunk/gcc/expr.c:3434
#3  0x0079b491 in emit_move_insn (x=0x76d30c40, y=0x76d30ae0)
at ../../gcc-trunk/gcc/expr.c:3497
#4  0x007a764b in copy_to_reg (x=0x76d30ae0) at
../../gcc-trunk/gcc/explow.c:620
#5  0x00592988 in gen_lowpart_general (mode=QImode, x=Unhandled dwarf
expression opcode 0xf3
) at ../../gcc-trunk/gcc/rtlhooks.c:50
#6  0x00c62f47 in gen_cmpstrnsi (operand0=0x76d30ae0,
operand1=Unhandled dwarf expression opcode 0xf3
) at ../../gcc-trunk/gcc/config/i386/i386.md:16357
#7  0x0059a752 in
_ZL22expand_builtin_strncmpP9tree_nodeP7rtx_def12machine_mode.isra.40
(exp=0x76d2dd20, target=0x76d309a0)
at ../../gcc-trunk/gcc/builtins.c:4083
#8  0x0059ccd5 in expand_builtin (exp=0x76d2dd20, target=Unhandled
dwarf expression opcode 0xf3
) at ../../gcc-trunk/gcc/builtins.c:6252
#9  0x00796a6d in expand_expr_real_1 (exp=0x76d2dd20, target=, tmode=SImode, modifier=EXPAND_NORMAL, 
alt_rtl=0x7fffd9c8) at ../../gcc-trunk/gcc/expr.c:10155
#10 0x0079a51e in expand_expr_real (exp=0x76d2dd20,
target=Unhandled dwarf expression opcode 0xf3
) at ../../gcc-trunk/gcc/expr.c:7852
#11 0x0057ea62 in store_expr (exp=0x76d2dd20,
target=0x76d309a0, call_param_p=0, nontemporal=Unhandled dwarf expression
opcode 0xf3
) at ../../gcc-trunk/gcc/expr.c:5162
#12 0x00587f6e in expand_assignment (to=0x76d2d870,
from=0x76d2dd20, nontemporal=Unhandled dwarf expression opcode 0xf3
) at ../../gcc-trunk/gcc/expr.c:4948
#13 0x009bbd43 in expand_call_stmt (stmt=0x76d43690) at
../../gcc-trunk/gcc/cfgexpand.c:2080
#14 expand_gimple_stmt_1 (stmt=0x76d43690) at
../../gcc-trunk/gcc/cfgexpand.c:2121
#15 expand_gimple_stmt (stmt=0x76d43690) at
../../gcc-trunk/gcc/cfgexpand.c:2273
#16 0x00b4fea1 in expand_gimple_basic_block (bb=0x76c0fbd0) at
../../gcc-trunk/gcc/cfgexpand.c:4039
#17 0x008c4464 in gimple_expand_cfg () at
../../gcc-trunk/gcc/cfgexpand.c:4557
#18 0x00bc0225 in execute_one_pass (pass=0x11691c0) at
../../gcc-trunk/gcc/passes.c:2164
#19 0x00bc0715 in execute_pass_list (pass=0x11691c0) at
../../gcc-trunk/gcc/passes.c:2219
#20 0x00bbfb46 in expand_function (node=0x76c1b750) at
../../gcc-trunk/gcc/cgraphunit.c:1622
#21 0x00d11f6e in expand_all_functions () at
../../gcc-trunk/gcc/cgraphunit.c:1727
#22 compile () at ../../gcc-trunk/gcc/cgraphunit.c:2025
#23 compile () at ../../gcc-trunk/gcc/cgraphunit.c:1949
#24 0x00d12785 in finalize_compilation_unit () at
../../gcc-trunk/gcc/cgraphunit.c:2102
#25 0x00d12928 in c_write_global_declarations () at
../../gcc-trunk/gcc/c-decl.c:10106
#26 c_write_global_declarations () at ../../gcc-trunk/gcc/c-decl.c:10049
#27 0x0097ea26 in compile_file (argc=6, argv=0x7fffdf58) at
../../gcc-trunk/gcc/toplev.c:566
#28 do_compile (argc=6, argv=0x7fffdf58) at
../../gcc-trunk/gcc/toplev.c:1870
#29 toplev_main (argc=6, argv=0x7fffdf58) at
../../gcc-trunk/gcc/toplev.c:1946
#30 0x00371721ecdd in __libc_start_main () from /lib64/libc.so.6
#31 0x004b3f39 in _start ()
(gdb) s
391{
(gdb) s
392  switch (GET_MODE_CLASS (mode))
(gdb) s
416  if (mode == BLKmode)
(gdb) s
390int_mode_for_mode (enum machine_mode mode)
(gdb) s
int_mode_for_mode (mode=VOIDmode) at ../../gcc-trunk/gcc/stor-layout.c:423
423  gcc_unreachable ();
(gdb) s
fancy_abort (file=0xeefc38 "../../gcc-trunk/gcc/stor-layout.c", line=423,
function=0xf07160 "int_mode_for_mode") at ../../gcc-trunk/gcc/diagnostic.c:1010
1010{


[Bug c++/53549] g++ and armadillo 3.2.0, operator() is inaccessible

2012-06-01 Thread conradsand.arma at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53549

--- Comment #3 from Conrad  2012-06-01 
13:27:47 UTC ---
arma::ivec3 from Armadillo works under gcc 4.4.6 20110731 (Red Hat 4.4.6-3).

This bug might be related to 52470 and 52685:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52470
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52685

However, Christoffer mentioned that arma::ivec3 doesn't work with gcc-snapshot
4.8.20120520, while bug 52685 seems to be resolved as of 2012-03-29.


[Bug c++/53553] New: misleading locations for error in initializers

2012-06-01 Thread akim.demaille at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53553

 Bug #: 53553
   Summary: misleading locations for error in initializers
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: akim.demai...@gmail.com


Created attachment 27541
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27541
Test case

In the following example:

struct foo
{
  foo(int a, int b, int c)
: a_(a)
, b_(b)
, c_(c)
  {}
  int* a_;
  int b_;
  int c_;
};

g++ 4.8 reports:

ctor.cc: In constructor 'foo::foo(int, int, int)':
ctor.cc:6:11: error: invalid conversion from 'int' to 'int*' [-fpermissive]
 , c_(c)
   ^
while, of course, the error is on a_, at line 4, not 6.  4.7 is wrong too (it
reports line 6 instead of 4), yet caret-errors make it even more confusing.

Thanks for the good work!


[Bug fortran/53552] New: Add support for !GCC$ warning directive (cf. #pragma warning)

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53552

 Bug #: 53552
   Summary: Add support for !GCC$ warning directive (cf. #pragma
warning)
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: bur...@gcc.gnu.org
Depends on: 41209


As suggested at http://gcc.gnu.org/ml/fortran/2012-06/msg3.html - and
related to PR 41209.

In C/C++, one can selectively enable and disable warnings, cf.
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas

A gfortran solution could be:

  !GCC$ diagnostic warning "-Wconversion"

The support could be also added via #pragma for "-cpp".

Note: The "diagnostic warning" features requires tracking of the directive
location as it does not apply for the whole file. Additionally, the warning
flags can apply to both front-end as well as in the middle-end warnings.

(Remark with regards to #pragma: Those cannot be use in macros; C/C++ uses for
those _Pragma [cf. PR53469].)


[Bug fortran/35015] missing cleanup-modules directive in testsuite/gfortran*

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35015

Tobias Burnus  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||burnus at gcc dot gnu.org
 Resolution||FIXED

--- Comment #9 from Tobias Burnus  2012-06-01 
12:43:30 UTC ---
As by default the .mod files of the modules in a test-suite file are removed, I
think this PR can be CLOSED. I did so now.


[Bug tree-optimization/53550] [4.6/4.7/4.8 regression] ICE with -O{1,2,3} -fprefetch-loop-arrays in build2_stat, at tree.c:3803

2012-06-01 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53550

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #4 from Jakub Jelinek  2012-06-01 
12:39:52 UTC ---
Created attachment 27540
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27540
gcc48-pr53550.patch

Full patch (untested).


[Bug c++/50134] -Wmissing-prototypes doesn't work for C++

2012-06-01 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50134

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #20 from Paolo Carlini  2012-06-01 
12:39:07 UTC ---
Great, thanks Jon.


[Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap

2012-06-01 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433

--- Comment #15 from Markus Trippelsdorf  
2012-06-01 12:31:37 UTC ---
(In reply to comment #13)
> (In reply to comment #12)
> > You bootstrap-lto with -march=native -ftree-vectorize and then the
> > bootstrapped compiler ICEs with the posted testcases?
> 
> Yes.

It also happens without "-march=native -ftree-vectorize".
A simple "make -j4 profiledbootstrap" (--with-build-config=bootstrap-lto) also
fails.


[Bug tree-optimization/53550] [4.6/4.7/4.8 regression] ICE with -O{1,2,3} -fprefetch-loop-arrays in build2_stat, at tree.c:3803

2012-06-01 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53550

--- Comment #3 from Jakub Jelinek  2012-06-01 
12:29:11 UTC ---
I'd think
--- tree-ssa-loop-niter.c.jj2012-05-30 14:38:55.0 +0200
+++ tree-ssa-loop-niter.c2012-06-01 14:27:43.202456745 +0200
@@ -1276,13 +1276,14 @@ number_of_iterations_cond (struct loop *
  practice, but it is simple enough to manage.  */
   if (!integer_zerop (iv0->step) && !integer_zerop (iv1->step))
 {
+  tree step_type = POINTER_TYPE_P (type) ? sizetype : type;
   if (code != NE_EXPR)
 return false;

-  iv0->step = fold_binary_to_constant (MINUS_EXPR, type,
+  iv0->step = fold_binary_to_constant (MINUS_EXPR, step_type,
iv0->step, iv1->step);
   iv0->no_overflow = false;
-  iv1->step = build_int_cst (type, 0);
+  iv1->step = build_int_cst (step_type, 0);
   iv1->no_overflow = true;
 }
would match what tree-chrec.c is doing.


[Bug c++/53551] -Wunused-local-typedefs misses uses

2012-06-01 Thread akim.demaille at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53551

--- Comment #1 from Akim Demaille  2012-06-01 
12:24:44 UTC ---
Created attachment 27539
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27539
Test case


[Bug c++/53551] New: -Wunused-local-typedefs misses uses

2012-06-01 Thread akim.demaille at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53551

 Bug #: 53551
   Summary: -Wunused-local-typedefs misses uses
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: akim.demai...@gmail.com


Hi!

In the following example, the "context" struct provides types to a template
class, "structure".  The provided type is used to define a member variable. 
Yet G++ 4.8 claims:

g++-mp-4.8 -std=c++11 -Wall bar.cc
bar.cc: In function 'int main()':
bar.cc:12:21: warning: typedef 'using type = int' locally defined but not used
[-Wunused-local-typedefs]
 using type = int;
 ^

This is:

g++-mp-4.8 (MacPorts gcc48 4.8-20120527_1) 4.8.0 20120527 (experimental)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The program is:


template 
struct structure
{
  typename C::type val;
};

int
main()
{
  struct context
  {
using type = int;
  };

  return structure{42}.val;
}

Thanks!


[Bug tree-optimization/53550] [4.6/4.7/4.8 regression] ICE with -O{1,2,3} -fprefetch-loop-arrays in build2_stat, at tree.c:3803

2012-06-01 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53550

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  2012-06-01 
12:03:40 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161655
(aka MEM_REF).  Guess the bug is that step's type is POINTER_TYPE, it should
probably be some integer type instead.


[Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap

2012-06-01 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433

--- Comment #14 from vincenzo Innocente  
2012-06-01 12:01:00 UTC ---
no need of lto just

/home/data/newsoft/gcc-build/./gcc/xgcc -B/home/data/newsoft/gcc-build/./gcc/
-B/afs/cern.ch/user/i/innocent/w2/x86_64-unknown-linux-gnu/bin/
-B/afs/cern.ch/user/i/innocent/w2/x86_64-unknown-linux-gnu/lib/ -c test.i -O2
test.i:2:1: warning: data definition has no type or storage class [enabled by
default]
 b;
 ^
test.i: In function 'd_demangle_callback':
test.i:6:21: internal compiler error: in int_mode_for_mode, at
stor-layout.c:423
   if (0 ? : strncmp (&b, "_GLOBAL_", 8) == '.'
 ^
Please submit a full bug report,


[Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap

2012-06-01 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433

--- Comment #13 from Markus Trippelsdorf  
2012-06-01 11:54:26 UTC ---
(In reply to comment #12)
> You bootstrap-lto with -march=native -ftree-vectorize and then the
> bootstrapped compiler ICEs with the posted testcases?

Yes.

> That would mean GCC is miscompiled, likely with a vectorizer bug ... that
> it needs LTO will make it quite hard to track down though :(

Any hints on how to track this down?


[Bug tree-optimization/53550] [4.6/4.7/4.8 regression] ICE with -O{1,2,3} -fprefetch-loop-arrays in build2_stat, at tree.c:3803

2012-06-01 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53550

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-06-01
Version|unknown |4.6.3
   Target Milestone|--- |4.6.4
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2012-06-01 
11:53:51 UTC ---
Confirmed.


[Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap

2012-06-01 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433

--- Comment #12 from Richard Guenther  2012-06-01 
11:50:33 UTC ---
You bootstrap-lto with -march=native -ftree-vectorize and then the
bootstrapped compiler ICEs with the posted testcases?

That would mean GCC is miscompiled, likely with a vectorizer bug ... that
it needs LTO will make it quite hard to track down though :(


[Bug tree-optimization/53550] New: [4.6/4.7/4.8 regression] ICE with -O{1,2,3} -fprefetch-loop-arrays in build2_stat, at tree.c:3803

2012-06-01 Thread xarthisius.kk at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53550

 Bug #: 53550
   Summary: [4.6/4.7/4.8 regression] ICE with -O{1,2,3}
-fprefetch-loop-arrays in build2_stat, at tree.c:3803
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: xarthisius...@gmail.com


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

Starting program: /dev/shm/portage/sys-devel/gcc-4.6.3/work/build/gcc/cc1 -O2
-fprefetch-loop-arrays /ice_416991.i
 wctomb mbstowcs luma_render
/ice_416991.i: In function 'luma_render':
/ice_416991.i:28:20: warning: incompatible implicit declaration of built-in
function 'malloc' [enabled by default]

Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data>   
Assembling functions:
 wctomb mbstowcs luma_render
Breakpoint 1, 0x005ba3e4 in fancy_abort ()
(gdb) bt
#0  0x005ba3e4 in fancy_abort ()
#1  0x009bf92b in build2_stat ()
#2  0x0064370e in build2_stat_loc ()
#3  0x0067967c in fold_build2_stat_loc ()
#4  0x0091022c in determine_exit_conditions ()
#5  0x00910549 in tree_transform_and_unroll_loop ()
#6  0x0091107c in tree_unroll_loop ()
#7  0x00ddfc64 in loop_prefetch_arrays ()
#8  0x00ddffc5 in tree_ssa_prefetch_arrays ()
#9  0x0091a47d in tree_ssa_loop_prefetch ()
#10 0x00759059 in execute_one_pass ()
#11 0x00759233 in execute_pass_list ()
#12 0x00759254 in execute_pass_list ()
#13 0x00759254 in execute_pass_list ()
#14 0x0088eae1 in tree_rest_of_compilation ()
#15 0x00a49d0b in cgraph_expand_function ()
#16 0x00a49eca in cgraph_expand_all_functions ()
#17 0x00a4a533 in cgraph_optimize ()
#18 0x00a48b22 in cgraph_finalize_compilation_unit ()
#19 0x0049de30 in c_write_global_declarations ()
#20 0x0083006e in compile_file ()
#21 0x00832000 in do_compile ()
#22 0x00832146 in toplev_main ()
#23 0x00521118 in main ()

Downstream bug: https://bugs.gentoo.org/show_bug.cgi?id=416991

I've checked that it also fails with gcc-4.4.6, however it works fine with
gcc-4.5.3.


[Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap

2012-06-01 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433

--- Comment #11 from Markus Trippelsdorf  
2012-06-01 11:44:57 UTC ---
Just a shot into the dark:
The only difference between glibc-2.12 and later in this area
is the introduction of SSE4.2 (SSSE3) support...


[Bug c++/53549] g++ and armadillo 3.2.0, operator() is inaccessible

2012-06-01 Thread admin at toffyrn dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53549

--- Comment #2 from Christoffer Hirth  2012-06-01 
10:39:15 UTC ---
I'm sorry that I forgot to include this. It is now uploaded to:
http://dl.dropbox.com/u/82144428/main.ii
If more details are needed please let me know.


[Bug c++/53549] g++ and armadillo 3.2.0, operator() is inaccessible

2012-06-01 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53549

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  2012-06-01 
10:30:09 UTC ---
Please provide preprocessed source, see http://gcc.gnu.org/bugs.html for
details.


[Bug middle-end/48124] [4.5/4.6/4.7 Regression] likely wrong code bug

2012-06-01 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48124

--- Comment #28 from rguenther at suse dot de  
2012-06-01 10:20:09 UTC ---
On Wed, 30 May 2012, ebotcazou at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48124
> 
> --- Comment #22 from Eric Botcazou  2012-05-30 
> 15:28:14 UTC ---
> > Bootstrapped on x86_64-unknown-linux-gnu.
> 
> This also needs to be tested on 32-bit and strict-alignment platforms.

I have now successfully tested it on i586-suse-linux-gnu,
powerpc-suse-linux-gnu and powerpc64-suse-linux-gnu.


[Bug c++/53549] New: g++ and armadillo 3.2.0, operator() is inaccessible

2012-06-01 Thread admin at toffyrn dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53549

 Bug #: 53549
   Summary: g++ and armadillo 3.2.0, operator() is inaccessible
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ad...@toffyrn.net


Compiling my project using armadillo fails with `is inaccessible' when trying
to use fixed size vectors, for example `ivec3'.

Armadillo is version 3.2.0 from http://arma.sourceforge.net/

The bug is seen in both gcc 4.7.0 and gcc-snapshot 4.8.20120520, on Arch Linux.
The bug is not present in gcc 4.6.3.


===
Test program:
[toffyrn@bohr Test]$ cat main.cpp 
#include 

int main(int argc, char** argv)
{
arma::ivec3 jjj;

return 0;
}


Error:
[toffyrn@bohr Test]$ g++ main.cpp -o run  -larmadillo
In file included from /usr/include/armadillo:399:0,
 from main.cpp:1:
/usr/include/armadillo_bits/Col_bones.hpp: In instantiation of ‘class
arma::Col::fixed<3u>’:
main.cpp:5:17:   required from here
/usr/include/armadillo_bits/Col_meat.hpp:512:1: error: ‘const
arma::subview_col arma::Col::operator()(const arma::span&) const’ is
inaccessible
In file included from /usr/include/armadillo:142:0,
 from main.cpp:1:
/usr/include/armadillo_bits/Col_bones.hpp:113:9: error: within this context
In file included from /usr/include/armadillo:399:0,
 from main.cpp:1:
/usr/include/armadillo_bits/Col_meat.hpp:500:1: error: ‘arma::subview_col
arma::Col::operator()(const arma::span&)’ is inaccessible
In file included from /usr/include/armadillo:142:0,
 from main.cpp:1:
/usr/include/armadillo_bits/Col_bones.hpp:113:9: error: within this context



GCC version:
[toffyrn@bohr Test]$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.7-20120505/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-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id
--with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold
--enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--with-linker-hash-style=gnu --disable-multilib --disable-libssp
--disable-build-with-cxx --disable-build-poststage1-with-cxx
--enable-checking=release
Thread model: posix
gcc version 4.7.0 20120505 (prerelease) (GCC)


[Bug fortran/53015] free_pi_tree(): Unresolved fixup is back

2012-06-01 Thread brainschrat at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53015

brainschrat at gmx dot de changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #8 from brainschrat at gmx dot de 2012-06-01 10:00:29 UTC ---
As 
1) I cannot reproduce this error reliably,
2) I am not able to reduce the test case with delta and
3) there is a known workaround (or rather there is no need to use the compiler
switches that trigger this),

I changed the status to resolved: invalid.


[Bug c/53502] [4.8 Regression] Bootstrap broken with --disable-build-poststage1-with-cxx

2012-06-01 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53502

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #10 from Jakub Jelinek  2012-06-01 
09:57:18 UTC ---
Fixed.  The warning is IMHO correct as is and we don't currently have a warning
for C++ that would warn if the source isn't also valid C, so FTTB we simply
need to do --disable-build-poststage1-with-cxx from time to time to make sure
it works well (I use it for rpm builds from release branches, but not for the
trunk bootstraps).


[Bug c++/50134] -Wmissing-prototypes doesn't work for C++

2012-06-01 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50134

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |4.8.0

--- Comment #19 from Jonathan Wakely  2012-06-01 
09:40:11 UTC ---
Manu, Paolo, the doc patch is in, are you happy to close this now?


[Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap

2012-06-01 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433

--- Comment #10 from vincenzo Innocente  
2012-06-01 09:18:00 UTC ---
any chance this bug gets attention anytime soon?
It blocks test and development with newish versions of glibc...


[Bug gcov-profile/53546] gcc ICEs when using -fripa at varpool.c:45

2012-06-01 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53546

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-06-01
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2012-06-01 
09:14:10 UTC ---
What's -fripa?


[Bug lto/53019] [4.7 regression] ICE (segfault) with -flto=jobserver -fwhole-program

2012-06-01 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53019

Richard Guenther  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||FIXED

--- Comment #7 from Richard Guenther  2012-06-01 
09:12:08 UTC ---
Fixed.


[Bug c++/50134] -Wmissing-prototypes doesn't work for C++

2012-06-01 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50134

--- Comment #18 from Jonathan Wakely  2012-06-01 
08:47:11 UTC ---
Author: redi
Date: Fri Jun  1 08:47:06 2012
New Revision: 188103

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188103
Log:
2012-06-01  Manuel López-Ibáñez  
Jonathan Wakely  

PR c++/50134
* doc/invoke.texi (Warning Options): Explain purpose and differences
between -Wmissing-prototypes and -Wmissing-declarations.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/invoke.texi


[Bug lto/53019] [4.7 regression] ICE (segfault) with -flto=jobserver -fwhole-program

2012-06-01 Thread kilobyte at angband dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53019

--- Comment #6 from Adam Borowski  2012-06-01 
08:04:43 UTC ---
Ok, works correctly on current trunk as well.

Since the testcase is messy and vulnerable to small alterations, and I guess
the underlying bug fixes already include a test for it, it's probably pointless
to try to introduce a variant of this one.

Thus, nothing more to do here.  Thanks guys for the fix, let's close this one.


[Bug fortran/53537] [4.5/4.6/4.7/4.8 Regression] Explicit IMPORT of renamed USE-associated symbol fails

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53537

--- Comment #4 from Tobias Burnus  2012-06-01 
08:04:09 UTC ---
(In reply to comment #3)
> The patch of comment 1 fails for testsuite/gfortran.dg/import7.f90:
> 
>  TYPE(T3) X
>1
>   Error: The type of 'x' at (1) has not been declared within the interface

The problem is the check in decl.c's variable_decl:

  st = gfc_find_symtree (gfc_current_ns->sym_root,
 current_ts.u.derived->name);

Here, "current_ts.u.derived->name" is "t1" (original name) while the symtree
has "t3" (renamed/imported name).  Thus, "st" is NULL.



However, the current code (without the patch) fails for the following program:

 type t1
1
  Error: Derived type definition of 't1' at (1) has already been defined

Using the patch it works.

! --
   MODULE MOD
 TYPE T1
   SEQUENCE
   integer :: j
 END TYPE t1
   END
   PROGRAM MAIN
 USE MOD, T3 => T1
 INTERFACE SUBR
   SUBROUTINE SUBR1(X,y)
 IMPORT :: T3
 type t1
!   sequence
!   integer :: i
 end type t1
 TYPE(T3) X
! TYPE(T1) X
   END SUBROUTINE
   end program main
! --


One solution to the issue of comment 3 would be to change the gfc_find_symtree
by gfc_find_symbol; however, for the code above the gfc_find_symbol would find
two symbols: The locally defined "t1" and the imported one (with sym name "t1"
and symtree name "t3" or "t1" [w/ and w/o patch of comment 1]).

A 'simple' copy of the symbol plus changing its name might work (and fix the
issue of PR 53542, if also done in module.c); however, one also needs to ensure
that non-SEQUENCE/non-Bind(C) types are regarded as the same.


[Bug fortran/53521] [4.5/4.6/4.7 Regression] Memory leak with zero-sized array constructor

2012-06-01 Thread Joost.VandeVondele at mat dot ethz.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53521

Joost VandeVondele  changed:

   What|Removed |Added

Summary|[4.5/4.6/4.7/4.8|[4.5/4.6/4.7 Regression]
   |Regression] Memory leak |Memory leak with zero-sized
   |with zero-sized array   |array constructor
   |constructor |
  Known to fail|4.8.0   |

--- Comment #9 from Tobias Burnus  2012-05-31 
14:28:46 UTC ---
Author: burnus
Date: Thu May 31 14:28:41 2012
New Revision: 188062

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188062
Log:
2012-05-31  Tobias Burnus  

PR fortran/53521
* trans.c (gfc_deallocate_scalar_with_status): Properly
handle the case size == 0.


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

--- Comment #10 from Joost VandeVondele  
2012-06-01 07:42:41 UTC ---
Thanks Tobias... this fixes the issue I saw for CP2K. From some further tests I
did, I couldn't see any negative side effects.

I had a look at other gcc branches, the patch applies flawlessly to 4.7 and 4.6
(I did not have a 4.5 branch around). I would be very happy to see it
integrated in 4.7.1 and 4.6.4, as it is nearly impossible to fully code around
this in CP2K. Array constructors are used much, and it is hard to guess which
ones could be zero-sized.


[Bug ada/53517] gnat.dg/lto14.adb FAILs

2012-06-01 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53517

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #4 from Eric Botcazou  2012-06-01 
07:36:05 UTC ---
.


[Bug ada/53517] gnat.dg/lto14.adb FAILs

2012-06-01 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53517

--- Comment #3 from Eric Botcazou  2012-06-01 
07:34:12 UTC ---
Author: ebotcazou
Date: Fri Jun  1 07:34:05 2012
New Revision: 188101

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188101
Log:
PR ada/53517
* gnat.dg/lto14.adb: Skip on Solaris.

Modified:
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug ada/53517] gnat.dg/lto14.adb FAILs

2012-06-01 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53517

--- Comment #2 from Eric Botcazou  2012-06-01 
07:33:43 UTC ---
Author: ebotcazou
Date: Fri Jun  1 07:33:38 2012
New Revision: 188100

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188100
Log:
PR ada/53517
* gnat.dg/lto14.adb: Skip on Solaris.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gnat.dg/lto14.adb

--- Comment #3 from Eric Botcazou  2012-06-01 
07:34:12 UTC ---
Author: ebotcazou
Date: Fri Jun  1 07:34:05 2012
New Revision: 188101

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188101
Log:
PR ada/53517
* gnat.dg/lto14.adb: Skip on Solaris.

Modified:
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug ada/53517] gnat.dg/lto14.adb FAILs

2012-06-01 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53517

--- Comment #2 from Eric Botcazou  2012-06-01 
07:33:43 UTC ---
Author: ebotcazou
Date: Fri Jun  1 07:33:38 2012
New Revision: 188100

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188100
Log:
PR ada/53517
* gnat.dg/lto14.adb: Skip on Solaris.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gnat.dg/lto14.adb