[Bug libgcc/58571] New: Warning while building gcc

2013-09-29 Thread mirraz1 at rambler dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58571

Bug ID: 58571
   Summary: Warning while building gcc
   Product: gcc
   Version: 4.7.3
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: libgcc
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mirraz1 at rambler dot ru

While building gcc-4.7.3 I'v got this compilation warning:
gcc-4.7.3/libgcc/crtstuff.c:451:19: warning: array subscript is above array
bounds [-Warray-bounds]


[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2013-09-29 Thread dl.soluz at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483

--- Comment #5 from dennis luehring  ---
but clang 3.3 produces only the optimized output when using -O2 (-O3 still
invokes the loop optimizer too early - but this is a known bug)

so it seems that the llvm/clang developers think that new/delete can be removed
the same way as malloc/free


[Bug c/58564] possible wrong code bug at -O0

2013-09-29 Thread mikpelinux at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58564

--- Comment #4 from Mikael Pettersson  ---
(In reply to John Regehr from comment #3)
> Kai, this is a real bug, please reopen it.
> 
> Here is what I get out of -fdump-tree-original:
> 
>   b = (int) (d == &c && a != 1);
> 
> This is wrong.
> 
> One way to illustrate the problem is to remove the useless comma operator
> from the test case, which now looks like this (I've also added parens around
> the ^):

I can confirm this observation.  Adding parentheses around the "a ^ 1" makes no
difference, but removing the comma operator and its left operand "0, " makes
4.7 to trunk compute the same result as 4.6 and older did.


[Bug libgcc/58571] Warning while building gcc

2013-09-29 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58571

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||manu at gcc dot gnu.org
 Resolution|--- |INVALID

--- Comment #1 from Manuel López-Ibáñez  ---
Not a problem. See:

http://gcc.gnu.org/wiki/FAQ#stage1warnings

[Bug libstdc++/58562] std::sort fails with -D_GLIBCXX_DEBUG enabled, whose bug?

2013-09-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58562

Jonathan Wakely  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Jonathan Wakely  ---
This looks like rockstar programmer work here:

  bool operator< (const matrixVectorProdTerm &j) const {
return (hentry < j.hentry) || (gentry < j.gentry) || (dest < j.dest);
  };

http://www.sgi.com/tech/stl/StrictWeakOrdering.html


[Bug libstdc++/58562] std::sort fails with -D_GLIBCXX_DEBUG enabled, whose bug?

2013-09-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58562

--- Comment #6 from Jonathan Wakely  ---
Specifically it fails this requirement:

matrixVectorProdTerm a(1, 0, 0);
matrixVectorProdTerm b(0, 1, 0);

assert( !(a

[Bug libstdc++/58562] std::sort fails with -D_GLIBCXX_DEBUG enabled, whose bug?

2013-09-29 Thread jpritikin at pobox dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58562

--- Comment #7 from Joshua N Pritikin  ---
Ah, I see. Thanks for pointing out my stupidity. :-)


[Bug bootstrap/58572] New: [4.9 regression] make install uses -Wno-narrowing with system compiler which does not know about it

2013-09-29 Thread gerald at pfeifer dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58572

Bug ID: 58572
   Summary: [4.9 regression] make install uses -Wno-narrowing with
system compiler which does not know about it
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gerald at pfeifer dot com

Created attachment 30926
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30926&action=edit
Build log for a non-parallel build and install that shows the failure

On i386-unknown-freebsd10.0, amd64-unknown-freebsd8.3, and I assume any
system that has a sufficiently old version of GCC as the system compiler
installation now fails as follows:

gmake[2]: Entering directory `/scratch/tmp/gerald/OBJ-0927-1848/gcc'
g++ -c  -DIN_GCC_FRONTEND -g -O2 -DIN_GCC   -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common
-DHAVE_CONFIG_H -I. -Ic -I/scratch/tmp/gerald/gcc-HEAD/gcc ...[-I 
options]...
-o c/c-lang.o -MT c/c-lang.o -MMD -MP -MF c/.deps/c-lang.TPo
/scratch/tmp/gerald/gcc-HEAD/gcc/c/c-lang.c
cc1plus: error: unrecognized command line option "-Wno-narrowing"
gmake[2]: *** [c/c-lang.o] Error 1
gmake[1]: *** [install-gcc] Error 2
gmake: *** [install] Error 2

g++ here is GCC 4.2 which does not know about -Wnarrowing.

And configuring for and building stage 1 we correctly identify that
  checking whether gcc supports -Wnarrowing... no
and this flag was not used during stage 1.

This works until and including r202892 | law | 2013-09-25 15:33:34.


[Bug tree-optimization/57719] [4.8/4.9 Regression] wrong code at -O3 on x86_64-linux-gnu

2013-09-29 Thread mikpelinux at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57719

--- Comment #6 from Mikael Pettersson  ---
The wrong-code for tests #3 and #4 (both 4.9-only regressions) was fixed by
Richard's PR58223 patch in r202096.


[Bug libgcc/58571] Warning while building gcc

2013-09-29 Thread mirraz1 at rambler dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58571

--- Comment #2 from Ilya  ---
(In reply to Manuel López-Ibáñez from comment #1)
> Not a problem. See:
> 
> http://gcc.gnu.org/wiki/FAQ#stage1warnings

> GCC is built in stages. The first stage uses the system compiler, which may 
> have bugs or not handle special conversion type characters handled by the GCC 
> version being built (this particular warning). Therefore, warnings produced 
> by the system compiler are often wrong. Please, do not report them.

The system compiler for the first stage was also gcc-4.7.3

[Bug ada/58573] New: Bug box on return conditional expression with an imported function

2013-09-29 Thread laguest at archeia dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58573

Bug ID: 58573
   Summary: Bug box on return conditional expression with an
imported function
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: laguest at archeia dot com

Created attachment 30927
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30927&action=edit
Minimal files to cause bug box.

After defining a function which imports another C function and using this as
the return type in a conditional expression, I get a bug box.

$ gnatmake -gnatd.n -c debug.adb 
gcc -c -gnatd.n debug.adb
/home/laguest/opt/tinyada/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/adainclude/system.ads
debug.adb
debug.ads
/home/laguest/opt/tinyada/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/adainclude/interfac.ads
/home/laguest/opt/tinyada/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/adainclude/i-c.ads
/home/laguest/opt/tinyada/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/adainclude/s-parame.ads
/home/laguest/opt/tinyada/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/adainclude/s-stalib.ads
/home/laguest/opt/tinyada/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/adainclude/ada.ads
/home/laguest/opt/tinyada/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/adainclude/a-unccon.ads
/home/laguest/opt/tinyada/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/adainclude/s-exctab.ads
+===GNAT BUG DETECTED==+
| 4.9.0 20130916 (experimental) (x86_64-unknown-linux-gnu) Assert_Failure
nlists.adb:930|
| Error detected at debug.adb:23:7 |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

debug.adb
debug.ads

compilation abandoned
gnatmake: "debug.adb" compilation error

I can get around the bug by changing the code to a temporary c.int and doing
the test on that.

...
  Error : C.int := SDL_Pixel_Format_Enum_To_Masks
(Format,
 Bits,
 Red_Mask,
 Green_Mask,
 Blue_Mask,
 Alpha_Mask);
   begin
  return (if Error  = 1 then True else False);
   end To_Masks;
...


[Bug c++/58536] [c++1y] ICE with auto in constructor

2013-09-29 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58536

Daniel Krügler  changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #1 from Daniel Krügler  ---
This code snippet is not valid, not even in C++14. Could you explain why you
think it would be valid?

[Bug c++/58548] [4.9 Regression] [c++1y] ICE with local struct in function with auto parameter

2013-09-29 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58548

Daniel Krügler  changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #2 from Daniel Krügler  ---
This is invalid code. The auto placeholder in the position of a parameter is
only valid for polymorphic lambda closures.

[Bug c++/58549] [4.9 Regression] [c++1y] ICE with local function in function with auto parameter

2013-09-29 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58549

Daniel Krügler  changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #4 from Daniel Krügler  ---
This is invalid code (auto as decl-specifier only supported by polymorphic
lambda closures)

[Bug c++/58561] [c++11] ICE using declaration of function with auto in return type

2013-09-29 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58561

Daniel Krügler  changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #1 from Daniel Krügler  ---
The code is invalid under C++11 but should be valid under C++14

[Bug target/58574] New: [4.9 Regression] Wrong code due to s390x machine reorg pass

2013-09-29 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58574

Bug ID: 58574
   Summary: [4.9 Regression] Wrong code due to s390x machine reorg
pass
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org
CC: krebbel at gcc dot gnu.org

Created attachment 30928
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30928&action=edit
scipy.C

The attached testcase is miscompiled with -O2 -march=z10 -m64 on s390x-linux.
foo function starts with:
cfdbr   %r1,5,%f0
clijle  %r1,93,.L70
.L68:
larl%r5,.L586
but doesn't initialize %r5 at all at label .L70 or after it (that is the
switch), while various cases use %r5.


[Bug tree-optimization/57719] [4.8/4.9 Regression] wrong code at -O3 on x86_64-linux-gnu

2013-09-29 Thread mikpelinux at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57719

--- Comment #7 from Mikael Pettersson  ---
The wrong-code for tests #1 and #2 (both 4.8/4.9 regressions) was also fixed
for 4.9 by Richard's PR58223 patch in r202096.  That patch has been backported
to 4.8 branch, and the tests do work with current 4.8.


[Bug target/58574] [4.8/4.9 Regression] Wrong code due to s390x machine reorg pass

2013-09-29 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58574

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|--- |4.8.2
Summary|[4.9 Regression] Wrong code |[4.8/4.9 Regression] Wrong
   |due to s390x machine reorg  |code due to s390x machine
   |pass|reorg pass

--- Comment #1 from Jakub Jelinek  ---
Reproduced with 4.8 branch too.


[Bug c++/52094] ICE on definition of nested class in wrong namespace scope with wrong nested-name-qualifier

2013-09-29 Thread arnaut.billings at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52094

arnaut.billings at yahoo dot com changed:

   What|Removed |Added

 CC||arnaut.billings at yahoo dot 
com

--- Comment #6 from arnaut.billings at yahoo dot com ---
Cygwin gcc (GCC) 4.7.3

Nested class in wrong class with typedef name qualifier also causes a
segmentation fault:

struct Foo
{
  struct Impl;
};

struct Bar
{
  typedef Foo base_type;

  struct base_type::Impl
  {
  };

};

Note: if "struct base_type::Impl" is changed to "struct Foo::Impl" then it will
produce an error message.


[Bug target/10901] non-local goto's don't work on darwin

2013-09-29 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10901

--- Comment #28 from Iain Sandoe  ---
Author: iains
Date: Sun Sep 29 20:14:39 2013
New Revision: 203019

URL: http://gcc.gnu.org/viewcvs?rev=203019&root=gcc&view=rev
Log:
gcc:

PR target/10901
* config/darwin-protos.h (machopic_get_function_picbase): New.
* config/darwin.c (machopic_get_function_picbase): New.
* config/rs6000/darwin.md (load_macho_picbase_si): Update picbase
label for a new func.  (load_macho_picbase_di): Likewise.
(reload_macho_picbase): New expand.
(reload_macho_picbase_si): New insn.
(reload_macho_picbase_di): New insn.
(nonlocal_goto_receiver): New define and split.
* config/rs6000/rs6000.md (unspec enum): Add UNSPEC_RELD_MPIC.
(unspecv enum): Add UNSPECV_NLGR.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/darwin-protos.h
trunk/gcc/config/darwin.c
trunk/gcc/config/rs6000/darwin.md
trunk/gcc/config/rs6000/rs6000.md


[Bug target/58574] [4.8/4.9 Regression] Wrong code due to s390x machine reorg pass

2013-09-29 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58574

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-09-29
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1


[Bug c++/58536] [c++1y] ICE with auto in constructor

2013-09-29 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58536

--- Comment #2 from Volker Reichelt  ---
It's a GNU extension as mentioned in the ChangeLog:

2013-09-16  Adam Butcher  

* cp-tree.h (type_uses_auto_or_concept): Declare.
(is_auto_or_concept): Declare.
* decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
-std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
[...]


[Bug c++/58548] [4.9 Regression] [c++1y] ICE with local struct in function with auto parameter

2013-09-29 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58548

--- Comment #3 from Volker Reichelt  ---
It's a GNU extension, see comment #2 in PR58536.


[Bug c++/58549] [4.9 Regression] [c++1y] ICE with local function in function with auto parameter

2013-09-29 Thread reichelt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58549

--- Comment #5 from Volker Reichelt  ---
It's a GNU extension, see comment #2 in PR58536.


[Bug c++/58575] New: gcc should compile firefox code faster.

2013-09-29 Thread tsaunders at mozilla dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58575

Bug ID: 58575
   Summary: gcc should compile firefox code faster.
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tsaunders at mozilla dot com
CC: hubicka at ucw dot cz

Its ceretainly possible given
https://blog.mozilla.org/nnethercote/2013/09/12/bleg-for-a-new-machine-2/ (I'm
not sure what versions njn is using but probably doesn't matter too much).
I rofiled build a build of content/ in the firefox tree for a --enable-optimize
--disable-debug build you can see the data I gathered at
http://people.mozilla.org/~tsaunders/gcc-perf.data .  The two things that came
up high in profiles were C++ parsing stuff and memory allocation.  I suppose
there isn't too much to be done about the memory allocation issue in the short
term, but I wonder if there's changes to the parser that would help at least
some.


[Bug middle-end/57586] ICE when expanding volatile asm using unaligned pointer

2013-09-29 Thread bernd.edlinger at hotmail dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57586

Bernd Edlinger  changed:

   What|Removed |Added

 CC||bernd.edlinger at hotmail dot 
de

--- Comment #8 from Bernd Edlinger  ---
(In reply to Alan Modra from comment #7)
> Fixed

Sorry, this change does not look right,
because you should not use EXPAND_NORMAL for
an output parameter, even if it is no inout.


[Bug target/10901] non-local goto's don't work on darwin

2013-09-29 Thread mrs at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10901

mrs at gcc dot gnu.org  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #29 from mrs at gcc dot gnu.org  ---
Thanks all.


[Bug libstdc++/58576] New: std::regex_match() reports mismatched braces on a valid regex

2013-09-29 Thread galens at capaccess dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58576

Bug ID: 58576
   Summary: std::regex_match() reports mismatched braces on a
valid regex
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: galens at capaccess dot org

Created attachment 30929
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30929&action=edit
Archive containing the g++ -v -save-temps compile log, the generated .ii file
and the original .cpp with the minimum-to-reproduce test case.

I attempted to use a regex to validate qualified hostnames.

However, when I used the regex from this thread (
http://stackoverflow.com/questions/1418423/the-hostname-regex ), with or
without replacing the [0-9A-Za-z] with [:alnum:] (and properly escaping the
backslashes), I get a regex_error exception thrown on std::regex_match() call,
with a regex_constants::error_brack as the reported code().


Using: An unmodified copy of gcc 4.8.1 20130603 from the Fedora 19 primary
repository (rpm ver: 4.8.1-1.fc19 )

(I use 4-spaces-per-tab in my source code, which isn't relevant for the code,
but might make hand-tracing of Parens, Braces, and Brackets I did in comments
more understandable.) 

(And, yes, I know replacing [0-9A-Za-z] with [:alnum:] isn't a legitimate
change WRT domain name validity, unless I force a 'C' locale.  It was just
easier to read when hunting down this issue.)


[Bug libstdc++/58576] std::regex_match() reports mismatched braces on a valid regex

2013-09-29 Thread galens at capaccess dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58576

Galen G Brownsmith  changed:

   What|Removed |Added

  Attachment #30929|0   |1
is obsolete||

--- Comment #1 from Galen G Brownsmith  ---
Created attachment 30930
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30930&action=edit
re-uploading my tar.gz -- fixed an independent but potentially distracting
typo.

There was a case where part of the regex read "(?(?:" rather than "(?:(?:". 
Fixed that, behvior remains.


[Bug target/56853] GNU Fortran is not working

2013-09-29 Thread msharp at TxBiomed dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56853

msharp at TxBiomed dot org changed:

   What|Removed |Added

 CC||msharp at TxBiomed dot org

--- Comment #2 from msharp at TxBiomed dot org ---
Created attachment 30931
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30931&action=edit
x86_64-apple-darwin12/libgfortran/config.log

Ran:
sudo port upgrade outdated


[Bug c++/58568] [4.8/4.9 Regression] [c++11] ICE with lambda in invalid template variable definition

2013-09-29 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58568

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-09-30
 CC||jason at gcc dot gnu.org,
   ||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Marek Polacek  ---
Started with r196742.


[Bug c/58564] possible wrong code bug at -O0

2013-09-29 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58564

Kai Tietz  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Last reconfirmed||2013-09-30
 Resolution|INVALID |---
 Ever confirmed|0   |1

--- Comment #5 from Kai Tietz  ---
Sorry, missed that outer condition is 0 > ... boolean-typed-expr.

Can confirm this issue.  Btw this condition has to be always false for unsigned
1-bit precision typed integrals.