[Bug c++/53494] New: initializer lists in array type

2012-05-26 Thread marcus-yass at ihug dot co.nz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53494

 Bug #: 53494
   Summary: initializer lists in array type
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: marcus-y...@ihug.co.nz


Created attachment 27502
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27502
preprocessed source for failed compile

g++-4.7 -std=c++11 1.cpp -o e1

1.cpp:
#include 
#include 
#include 
using namespace std;

array const, 1> const matchSynonyms{ {"smile",1} };

int main(int argc, char **argv){
cout<<"success"<

[Bug c++/53494] initializer lists in array type

2012-05-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53494

--- Comment #1 from Paolo Carlini  2012-05-26 
09:40:37 UTC ---
In any case a good workaround is using matchSynonyms{{ {"smile",1} }}


[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled

2012-05-26 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321

--- Comment #10 from Uros Bizjak  2012-05-26 10:09:35 
UTC ---
Reduced testcase:

--cut here--
typedef long unsigned int size_t;

extern "C"
{
  extern void *memcpy (void *__dest, __const void *__src, size_t __n);
}

extern char *src, *sources;
extern int n_sources;

static void
find_source (const char *file_name)
{
  memcpy (src, sources, n_sources * sizeof (*sources));
}

extern const char *gcov_read_string (void);

static void read_graph_file (void)
{
  find_source (gcov_read_string ());
}

static void process_file (void)
{
  read_graph_file ();
}

int main ()
{
  process_file ();
}
--cut here--

~/gcc-build/gcc/cc1plus -O2 -fprofile-generate -quiet t.C
t.C:32:1: internal compiler error: vector VEC(inline_edge_summary_t,base) index
domain error, in inline_edge_summary at ipa-inline.h:200
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


[Bug c++/53490] Segmentation Fault when accessing std::set

2012-05-26 Thread ja11sop at yahoo dot co.uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53490

--- Comment #7 from Jamie Allsop  2012-05-26 
10:59:46 UTC ---
(In reply to comment #6)
> (In reply to comment #4)
> > It was a vanilla bjam build of boost 1.49, so
> > no -std=c++11.
> 
> Then technically that's not supported, since there are no guarantees of
> link-compatibility between -std=c++98 and -std=c++11 code (but I'm not aware 
> of
> any specific reasons it wouldn't work for a std::set)
> 

So after sifting through the jam files to confirm there is no -std=c++11 set in
boost for gcc4.7 I modified my bjam invocations to add cxxflags="-std=c++11"
and now the test runs without the segfault. Verifying now on the full code
base. When the tests cycle and presumably pass I'll post back. It does look
however as if the mismatch in compile flags is the culprit here. Apologies for
not being thorough in checking that earlier.


[Bug ada/50294] ICE in output_constructor_regular_field

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50294

--- Comment #11 from Eric Botcazou  2012-05-26 
13:26:01 UTC ---
Author: ebotcazou
Date: Sat May 26 13:25:55 2012
New Revision: 187914

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187914
Log:
PR ada/50294
* gnat.dg/array21.adb: New test.

Added:
trunk/gcc/testsuite/gnat.dg/array21.adb
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug ada/50294] ICE in output_constructor_regular_field

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50294

Eric Botcazou  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
URL||http://gcc.gnu.org/ml/gcc-c
   ||vs/2012-05/msg00038.html
 Resolution||FIXED
   Target Milestone|--- |4.8.0

--- Comment #12 from Eric Botcazou  2012-05-26 
13:33:00 UTC ---
Not clear whether this is the most appropriate wording, but...


[Bug c/53467] xgcc:Internal error: Bus error (program cc1)

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53467

Eric Botcazou  changed:

   What|Removed |Added

   Severity|blocker |normal


[Bug bootstrap/52878] [4.8 regression] bootstrap failure: "MASK_LONG_DOUBLE_128" redefined

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52878

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #18 from Eric Botcazou  2012-05-26 
13:38:35 UTC ---
.


[Bug target/52205] unwinding through signal handler fails

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52205

Eric Botcazou  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0

--- Comment #13 from Eric Botcazou  2012-05-26 
13:49:41 UTC ---
.


[Bug rtl-optimization/52528] combine bug (powerpc testcase)

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52528

--- Comment #6 from Eric Botcazou  2012-05-26 
13:55:51 UTC ---
Author: ebotcazou
Date: Sat May 26 13:55:46 2012
New Revision: 187915

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187915
Log:
Backport from mainline
2012-03-10  Chung-Lin Tang  

PR rtl-optimization/52528
* combine.c (can_combine_p): Add setting of subst_low_luid
before call to expand_field_assignment().

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


[Bug rtl-optimization/52528] combine bug (powerpc testcase)

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52528

Eric Botcazou  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #7 from Eric Botcazou  2012-05-26 
13:57:00 UTC ---
.


[Bug target/52205] unwinding through signal handler fails

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52205

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #14 from Eric Botcazou  2012-05-26 
14:02:12 UTC ---
.


[Bug c/53495] New: segmentation fault

2012-05-26 Thread regehr at cs dot utah.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53495

 Bug #: 53495
   Summary: segmentation fault
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: reg...@cs.utah.edu
CC: cheny...@cs.utah.edu


[regehr@dyson r59]$ current-gcc -O1 small.c -c
small.c: In function 'fn4':
small.c:14:1: internal compiler error: Segmentation fault
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


[regehr@dyson r59]$ current-gcc -v
Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r187906-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/compiler-install/gcc-r187906-install
--program-prefix=r187906- --enable-languages=c,c++
Thread model: posix
gcc version 4.8.0 20120526 (experimental) (GCC) 


[regehr@dyson r59]$ cat small.c 
int a, b, c, d, e, g;
static char
fn1 (char p1, int p2)
{
return p1 || p2 < 0 || p2 >= 1 || 1 >> p2 ? p1 : 0;
}
static long long fn2 (int *, int);
static int fn3 ();
void
fn4 ()
{
fn3 ();
fn2 (&a, d);
}
long long
fn2 (int *p1, int p2)
{
int f = -1L;
for (; c <= 1; c++)
{
*p1 = 0;
*p1 = fn1 (c, p2 ^ f);
}
a = 0;
e = p2;
return 0;
}
int
fn3 ()
{
b = 3;
for (; b; b--)
c++;
g = 0 >= c;
return 0;
}


[Bug middle-end/43013] [4.5 regression] "warning: 'saved_stack.1' is used uninitialized in this function" with -fstack-check

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43013

Eric Botcazou  changed:

   What|Removed |Added

Summary|[4.5/4.6/4.7/4.8|[4.5 regression] "warning:
   |regression] "warning:   |'saved_stack.1' is used
   |'saved_stack.1' is used |uninitialized in this
   |uninitialized in this   |function" with
   |function" with  |-fstack-check
   |-fstack-check   |

--- Comment #8 from Eric Botcazou  2012-05-26 
14:17:26 UTC ---
Fixed on mainstream platforms since 4.6.


[Bug middle-end/39514] [4.5/4.6/4.7/4.8 Regression] unreported change to packed bitfields

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39514

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX

--- Comment #9 from Eric Botcazou  2012-05-26 
14:24:11 UTC ---
Obsolete by now.


[Bug rtl-optimization/53495] [4.8 Regression] segmentation fault

2012-05-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53495

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-05-26
  Component|c   |rtl-optimization
 CC||bernds at gcc dot gnu.org
 Ever Confirmed|0   |1
Summary|segmentation fault  |[4.8 Regression]
   ||segmentation fault
   Target Milestone|--- |4.8.0

--- Comment #1 from H.J. Lu  2012-05-26 14:27:03 
UTC ---
It is caused by revision 186378:

http://gcc.gnu.org/ml/gcc-cvs/2012-04/msg00329.html


[Bug ada/37945] GNAT Sockaddr and Sockaddr_In does not match c-structures on RTEMS

2012-05-26 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37945

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX

--- Comment #6 from Eric Botcazou  2012-05-26 
14:34:29 UTC ---
Obsolete.


[Bug c++/53494] initializer lists in array type

2012-05-26 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53494

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||error-recovery,
   ||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-05-26
 Ever Confirmed|0   |1

--- Comment #2 from Jonathan Wakely  2012-05-26 
14:50:36 UTC ---
#include 
#include 

using std::array;
using std::pair;

struct string
{
  string(const char*) { }
};

array const, 1> const matchSynonyms{ {"smile",1} };


[Bug target/53461] Incorrect handling of CASE_VECTOR_PC_RELATIVE in config/m68k.md

2012-05-26 Thread gvvn1200 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53461

t-rexky  changed:

   What|Removed |Added

   Severity|major   |normal


[Bug c++/53494] [4.7/4.8 Regression] ICE with invalid initializer list

2012-05-26 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53494

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||4.6.3
Summary|initializer lists in array  |[4.7/4.8 Regression] ICE
   |type|with invalid initializer
   ||list

--- Comment #3 from Jonathan Wakely  2012-05-26 
15:08:59 UTC ---
further reduced

#include 
using std::pair;

template
struct array
{
  typedef T value_type;
  value_type data[1];
};

struct string
{
  string(const char*) { }
};

array const> const matchSynonyms{ {"smile",1} };

4.6 correctly rejects it:

a.cc:16:70: error: too many initializers for 'array >::value_type [1] {aka const std::pair
[1]}'
a.cc:16:70: error: could not convert '(const char*)"smile"' from 'const char*'
to 'array >::value_type {aka const
std::pair}'

4.7 gives:

'
a.cc:16: confused by earlier errors, bailing out

and 4.8 gives:

'
in strip_typedefs, at cp/tree.c:1196
 array const> const matchSynonyms{ {"smile",1} };
  ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


[Bug c++/53494] [4.7/4.8 Regression] ICE with invalid initializer list

2012-05-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53494

--- Comment #4 from Paolo Carlini  2012-05-26 
15:16:29 UTC ---
And since it's actually invalid should be pretty easy to fix, the ICE is
happening in a gcc_assert where alignment is handled, nothing to do.


[Bug middle-end/52823] [4.8 Regression] FAIL: gnat.dg/renaming5.adb scan-tree-dump-times optimized "goto" 2

2012-05-26 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52823

Dominique d'Humieres  changed:

   What|Removed |Added

 Resolution|WONTFIX |FIXED

--- Comment #2 from Dominique d'Humieres  2012-05-26 
17:06:03 UTC ---
Fixed by revision 187912

Author:ebotcazou
Date:Sat May 26 11:46:53 2012 UTC (5 hours, 17 minutes ago)
Changed paths:2
Log Message:
* gnat.dg/renaming5.adb: Adjust dg-final directive.


[Bug c/53496] New: gcc segfaults when compiling glic

2012-05-26 Thread justas.poderys at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53496

 Bug #: 53496
   Summary: gcc segfaults when compiling glic
Classification: Unclassified
   Product: gcc
   Version: 4.4.5
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: justas.pode...@gmail.com


gcc segfaults when compiling glib-2.32.3 code:


make[5]: Entering directory `/home/justas/Downloads/glib-2.32.3/gobject/tests'
  CC param.o
param.c: In function ‘my_destroy’:
param.c:38: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[5]: *** [param.o] Error 1
make[5]: Leaving directory `/home/justas/Downloads/glib-2.32.3/gobject/tests'

gcc version:

justas@zaibukas:~/Downloads/glib-2.32.3$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-targets=all --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8)


[Bug middle-end/53496] gcc segfaults when compiling glic

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53496

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
  Component|c   |middle-end

--- Comment #1 from Andrew Pinski  2012-05-26 
17:19:45 UTC ---
Can you provide the preprocessed source?


[Bug c++/53493] [4.7 regression] Compiling with -Os excludes PROGMEM array from generated object file (__attribute__((__progmem__)))

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53493

--- Comment #1 from Andrew Pinski  2012-05-26 
17:21:38 UTC ---
Can you provide the preprocessed source?

I think this is done on purpose since foo is not used in the source and the
rules for C++ say the const variable has vague linkage GCC can (and will)
remove those variables which are not used.


[Bug middle-end/53496] gcc segfaults when compiling glic

2012-05-26 Thread justas.poderys at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53496

--- Comment #2 from Justas  2012-05-26 
17:25:40 UTC ---
Created attachment 27503
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27503
source of param.c


[Bug c++/53492] [g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 ] internal compiler error: in retrieve_specialization, at cp/pt.c:985

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53492

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-05-26
 Ever Confirmed|0   |1
  Known to fail||4.3.5, 4.4.5, 4.7.0, 4.8.0

--- Comment #1 from Andrew Pinski  2012-05-26 
17:29:55 UTC ---
t.cc: In instantiation of ‘class foo::quux’:
t.cc:24:25:   required from here
t.cc:15:5: internal compiler error: in retrieve_specialization, at cp/pt.c:1013
 quux(typename foo::bat*){}
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


[Bug tree-optimization/53480] warning "may be used uninitialized" issued with -m32 but not with -m64

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53480

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic

--- Comment #2 from Andrew Pinski  2012-05-26 
18:08:11 UTC ---
In GCC 4.7.0 and above, it does not warn with -m32 or -m64.


[Bug c++/53475] [4.8 Regression] Section type conflict errors in libstdc++ testsuite

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53475

Andrew Pinski  changed:

   What|Removed |Added

  Component|libstdc++   |c++
Version|4.7.0   |4.8.0
   Target Milestone|--- |4.8.0
Summary|Section type conflict   |[4.8 Regression] Section
   |errors in libstdc++ |type conflict errors in
   |testsuite   |libstdc++ testsuite

--- Comment #2 from Andrew Pinski  2012-05-26 
18:09:36 UTC ---
Can you attach the preprocessed sources?


[Bug target/53334] [4.8 Regression] ICE in extract_insn, at recog.c:2131

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53334

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #7 from Andrew Pinski  2012-05-26 
18:14:25 UTC ---
Fixed.


[Bug middle-end/53496] gcc segfaults when compiling glic

2012-05-26 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53496

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpe at it dot uu.se

--- Comment #3 from Mikael Pettersson  2012-05-26 
18:46:02 UTC ---
(In reply to comment #2)
> Created attachment 27503 [details]
> source of param.c

That file still includes stuff.  Please provide the _pre-processed_ file.


[Bug c++/53493] [4.7 regression] Compiling with -Os excludes PROGMEM array from generated object file (__attribute__((__progmem__)))

2012-05-26 Thread jwatte at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53493

--- Comment #2 from jwatte at gmail dot com 2012-05-26 19:22:01 UTC ---
Note that there is not yet any linkage involved -- this is simply a compile
pass. Specifically, the problem here is that I run into a missing symbol error
when linking a program that does use the symbol.

I'm pretty sure that the C++ standard does not specify that separate
compilation should break unless all const variables are used in the compilation
unit where they are defined.

I will attach the preprocessed source.


[Bug c++/53493] [4.7 regression] Compiling with -Os excludes PROGMEM array from generated object file (__attribute__((__progmem__)))

2012-05-26 Thread jwatte at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53493

--- Comment #3 from jwatte at gmail dot com 2012-05-26 19:25:50 UTC ---
Created attachment 27504
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27504
The preprocessed source

Generated with:
avr-gcc -Os -mmcu=atmega328p -c foo.cpp -o foo.E -E

Note that the "-Os" flag does not change the pre-processed source at all -- the
preprocessed output is the same with or without it.


[Bug c++/53493] [4.7 regression] Compiling with -Os excludes PROGMEM array from generated object file (__attribute__((__progmem__)))

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53493

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #4 from Andrew Pinski  2012-05-26 
19:26:27 UTC ---
> I'm pretty sure that the C++ standard does not specify that separate
> compilation should break unless all const variables are used in the 
> compilation
> unit where they are defined.

It defines them if they have const keyword, they have to be defined in each
translational unit.  If not then the one where it is declared has to be marked
extern.

Something like:
extern unsigned char const foo[4];
unsigned char const foo[4] = { 'f', 'o', 'o', 0 }; 
 CUT 
is required and that turns the linkage to be external.  Otherwise foo has vague
linkage (a C++ term saying it has to be the same in each translational unit
that it is used).


[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled

2012-05-26 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321

Steven Bosscher  changed:

   What|Removed |Added

 CC||steven at gcc dot gnu.org

--- Comment #11 from Steven Bosscher  2012-05-26 
19:39:28 UTC ---
At the point of the ICE:
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/stevenb/devel/build-test2/gcc/cc1plus -quiet -O2
-fprofile-generate t.cc

Breakpoint 2, internal_error (gmsgid=0x18d10b8 "vector %s %s domain error, in
%s at %s:%u") at ../../trunk/gcc/diagnostic.c:955
955   va_start (ap, gmsgid);
(gdb) up 4
#4  0x009bc54c in cgraph_propagate_frequency_1 (node=0x770d5888,
data=0x7fffde40) at ../../trunk/gcc/cgraph.c:1805
1805  if (inline_edge_summary (edge)->loop_depth)
(gdb) p debug_cgraph()
callgraph:

__gcov_indirect_call_profiler/25 () @0x772603a8
  Type: function
  Visibility: external public artificial
  References:
  Referring:
  Availability: not_available
  Function flags:
  Called by: main/3 (1.00 per call)
  Calls:
__gcov_ior_profiler/24 () @0x77260138
  Type: function
  Visibility: external public artificial
  References:
  Referring:
  Availability: not_available
  Function flags:
  Called by: _ZL11find_sourcePKc.isra.0/9 (1.00 per call)
  Calls:
__gcov_average_profiler/23 () @0x7726
  Type: function
  Visibility: external public artificial
  References:
  Referring:
  Availability: not_available
  Function flags:
  Called by: _ZL11find_sourcePKc.isra.0/9 (1.00 per call)
  Calls:
__gcov_one_value_profiler/22 () @0x770d59c0
  Type: function
  Visibility: external public artificial
  References:
  Referring:
  Availability: not_available
  Function flags:
  Called by: _ZL11find_sourcePKc.isra.0/9 (1.00 per call)
  Calls:
_ZL11find_sourcePKc.isra.0/9 (void _ZL11find_sourcePKc.isra.0())
@0x770d5ea0
  Type: function
  Visibility: artificial
  References: long int __gcov0._ZL11find_sourcePKc.isra.0 [1]/12 (read)long int
__gcov0._ZL11find_sourcePKc.isra.0 [1]/12 (write)int n_sources/5 (read)char*
sources/6 (read)char* src/7 (read)long int __gcov3._ZL11find_sourcePKc.isra.0
[3]/13 (addr)long int __gcov6._ZL11find_sourcePKc.isra.0 [2]/14 (addr)long int
__gcov7._ZL11find_sourcePKc.isra.0 [1]/15 (addr)
  Referring:
  Availability: local
  Function flags: analyzed body local finalized
  Called by: _ZL15read_graph_filev/1 (1.00 per call)
  Calls: void* memcpy(void*, const void*, size_t)/8 (1.00 per call)
__gcov_ior_profiler/24 (1.00 per call) __gcov_average_profiler/23 (1.00 per
call) __gcov_one_value_profiler/22 (1.00 per call)
void* memcpy(void*, const void*, size_t)/8 (void* memcpy(void*, const void*,
size_t)) @0x770d5d68
  Type: function
  Visibility: external public visibility_specified
  References:
  Referring:
  Availability: not_available
  Function flags:
  Called by: _ZL11find_sourcePKc.isra.0/9 (1.00 per call)
  Calls:
const char* gcov_read_string()/4 (const char* gcov_read_string())
@0x770d5c30
  Type: function
  Visibility: external public
  References:
  Referring:
  Availability: not_available
  Function flags:
  Called by: _ZL15read_graph_filev/1 (1.00 per call) (can throw external)
  Calls:
main/3 (int main()) @0x770d5af8
  Type: function
  Visibility: public
  Address is taken.
  References: long int* __gcov_indirect_call_counters/11 (read)void*
__gcov_indirect_call_callee/10 (read)main/3 (addr)void*
__gcov_indirect_call_callee/10 (write)long int __gcov0.main [2]/16 (read)long
int __gcov0.main [2]/16 (write)long int __gcov0.main [2]/16 (read)long int
__gcov0.main [2]/16 (write)
  Referring: main/3 (addr)
  Availability: available
  Function flags: analyzed body finalized only_called_at_startup
  Called by:
  Calls: _ZL15read_graph_filev/1 (1.00 per call) (can throw external)
__gcov_indirect_call_profiler/25 (1.00 per call)
_ZL15read_graph_filev/1 (void read_graph_file()) @0x770d5888
  Type: function
  Visibility: prevailing_def_ironly
  References: long int __gcov0._ZL15read_graph_filev [3]/17 (read)long int
__gcov0._ZL15read_graph_filev [3]/17 (write)long int
__gcov0._ZL15read_graph_filev [3]/17 (read)long int
__gcov0._ZL15read_graph_filev [3]/17 (write)long int
__gcov0._ZL15read_graph_filev [3]/17 (read)long int
__gcov0._ZL15read_graph_filev [3]/17 (write)
  Referring:
  Availability: local
  Function flags: analyzed body local finalized
  Called by: main/3 (1.00 per call) (can throw external)
  Calls: _ZL11find_sourcePKc.isra.0/9 (1.00 per call) const char*
gcov_read_string()/4 (1.00 per call) (can throw external)
$41 = void

Note the isra function. The ICE goes away with -fno-ipa-sra, and can be
triggered with "-O1 -fipa-sra -fprofile-generate".


[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled

2012-05-26 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321

--- Comment #12 from Steven Bosscher  2012-05-26 
19:42:26 UTC ---
Note, btw, that verify_cgraph() doesn't catch this. Honza, you loved checkers
so much a few years ago -- maybe this checker (also yours??) should be enhanced
:-)


[Bug c++/53493] [4.7 regression] Compiling with -Os excludes PROGMEM array from generated object file (__attribute__((__progmem__)))

2012-05-26 Thread jwatte at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53493

jwatte at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #5 from jwatte at gmail dot com 2012-05-26 20:22:55 UTC ---

"it has to be the same in each translational unit that it is used"

That doesn't mean it has to be /deleted/. An argument can be made that deleting
it from the compilation unit is not very useful. If I remember correctly, the
source of vague linkage was for allowing for the merging of inline template
instantiations (rather than explicitly.

Anyway, including the forward declaration in the definition translation unit as
well as the using translation unit does make it work, so it works around this
problem. Whether the behavior is useful or correct, I don't want to enter into
an argument about.


[Bug c++/53493] [4.7 regression] Compiling with -Os excludes PROGMEM array from generated object file (__attribute__((__progmem__)))

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53493

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #6 from Andrew Pinski  2012-05-26 
20:30:00 UTC ---
(In reply to comment #5)
> "it has to be the same in each translational unit that it is used"
> 
> That doesn't mean it has to be /deleted/.

It means it can be deleted.  This is not a bug in GCC but rather your source. 
C++ is different from C here.  Simple as that.  If it is deleted it exposes a
ODR violation in your source.


[Bug c++/53494] [4.7/4.8 Regression] ICE with invalid initializer list

2012-05-26 Thread marcus-yass at ihug dot co.nz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53494

--- Comment #5 from mako  2012-05-26 20:31:39 
UTC ---
Would someone please explain to me why that compile error is considered
correct? It tells me nothing sensible.


[Bug c++/53486] ICE compiling code using lambdas as default argument

2012-05-26 Thread jpalecek at web dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53486

Jiří Paleček  changed:

   What|Removed |Added

  Attachment #27499|0   |1
is obsolete||

--- Comment #6 from Jiří Paleček  2012-05-26 20:32:07 
UTC ---
Created attachment 27505
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27505
Minimal testcase reproducing the error


[Bug c++/53494] [4.7/4.8 Regression] ICE with invalid initializer list

2012-05-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53494

--- Comment #6 from Paolo Carlini  2012-05-26 
21:00:21 UTC ---
Who said correct?!?


[Bug c++/53220] [4.7/4.8 Regression] g++ mis-compiles compound literals

2012-05-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53220

--- Comment #15 from Jason Merrill  2012-05-26 
21:13:27 UTC ---
Author: jason
Date: Sat May 26 21:13:23 2012
New Revision: 187916

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187916
Log:
PR c++/53220
gcc/
* c-typeck.c (array_to_pointer_conversion): Give -Wc++-compat warning
about array compound literals.
gcc/cp/
* call.c (convert_like_real) [ck_list]: Take array address directly.
* typeck.c (decay_conversion): Reject decay of an array compound
literal.

Added:
trunk/gcc/testsuite/c-c++-common/array-lit.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-typeck.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/typeck.c
trunk/gcc/doc/extend.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ext/complit12.C


[Bug c++/25137] Warning "missing braces around initializer" causing problems with tr1::array

2012-05-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25137

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #17 from Jason Merrill  2012-05-26 
21:21:51 UTC ---
Hmm.  I see the argument, but it seems to me that the purpose of
-Wmissing-braces is precisely to warn about this sort of thing.  Perhaps it
just shouldn't be part of -Wall in C++ mode, particularly in C++11 since
initializer lists are a lot more flexible now.


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

2012-05-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53491

Paolo Carlini  changed:

   What|Removed |Added

Summary|[4.7/4.8 Regression] ICE in |[4.7 Regression] ICE in
   |build_target_expr_with_type |build_target_expr_with_type
   |, at cp/tree.c:587  |, at cp/tree.c:587

--- Comment #6 from Paolo Carlini  2012-05-26 
21:23:57 UTC ---
Fixed in mainline so far.


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

2012-05-26 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53491

--- Comment #5 from paolo at gcc dot gnu.org  
2012-05-26 21:20:44 UTC ---
Author: paolo
Date: Sat May 26 21:20:38 2012
New Revision: 187917

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187917
Log:
/cp
2012-05-26  Paolo Carlini  

PR c++/53491
* tree.c (stabilize_expr): Handle exp of void type.

/testsuite
2012-05-26  Paolo Carlini  

PR c++/53491
* g++.dg/parse/crash60.C: New.


Added:
trunk/gcc/testsuite/g++.dg/parse/crash60.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/tree.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/53494] [4.7/4.8 Regression] ICE with invalid initializer list

2012-05-26 Thread marcus-yass at ihug dot co.nz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53494

--- Comment #7 from mako  2012-05-26 21:41:57 
UTC ---
Uh, Johnathan said "4.6 correctly rejects it:", however 4.6's rejection message
appears every bit as useless as 4.7's, perhaps more so, because it
misattributes the error. If that's the correct way to reject it... Compiler
logic is beyond me.


[Bug c++/25137] Warning "missing braces around initializer" causing problems with tr1::array

2012-05-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25137

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot
   |gnu.org |com
   Target Milestone|--- |4.8.0

--- Comment #18 from Paolo Carlini  2012-05-26 
21:46:03 UTC ---
Let's take it out of C++ then.


[Bug c++/53439] g++ generates buggy code with optimisation flags

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53439

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-05-26
 Ever Confirmed|0   |1

--- Comment #2 from Andrew Pinski  2012-05-26 
22:38:38 UTC ---
Can you attach the preprocessed source of where the problem is?


[Bug c++/53434] Compiler decides declaration/expression ambiguity too soon.

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53434

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-05-26
 Depends on||29834
 Ever Confirmed|0   |1

--- Comment #1 from Andrew Pinski  2012-05-26 
22:44:04 UTC ---
Most likely a dup of bug 29834 (well at least related to it).


[Bug c/53424] dynamic array expressions get wrong sizeof() if pointers to const are involved and the pointers are changed (const is misapplied to the whole expression)

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53424

--- Comment #3 from Andrew Pinski  2012-05-26 
23:47:56 UTC ---
(gdb) p debug_tree(t)
 
unit size 
align 32 symtab 0 alias set -1 canonical type 0x76e6e000 precision
32 min  max 
pointer_to_this >
readonly
arg 0 
unsigned DI
size 
unit size 
align 64 symtab 0 alias set -1 canonical type 0x76e6e0a8>
used unsigned DI file t1.c line 6 col 13 size  unit size 
align 64 context  initial
>
t1.c:7:11>

The indirect reference is marked as readonly.
2663static bool
2664tree_invariant_p_1 (tree t)
2665{
2666  tree op;
2667
2668  if (TREE_CONSTANT (t)
2669  || (TREE_READONLY (t) && !TREE_SIDE_EFFECTS (t)))
2670return true;

Is where the issue is.


[Bug c++/53405] [4.5/4.6 Regression] Enum-dependent class template instantiations not recognized

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53405

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||rejects-valid
  Known to work||4.4.6, 4.7.0, 4.8.0
   Target Milestone|--- |4.5.4
Summary|Enum-dependent class|[4.5/4.6 Regression]
   |template instantiations not |Enum-dependent class
   |recognized  |template instantiations not
   ||recognized
  Known to fail||4.5.4, 4.6.0


[Bug bootstrap/53343] [4.8 regression] options.c:9944:1: error: no previous prototype for 'common_handle_option_auto' breaks bootstrap

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53343

--- Comment #3 from Andrew Pinski  2012-05-26 
23:54:26 UTC ---
>--disable-build-poststage1-with-cxx

Is there a reason why you are using this option?


[Bug target/53327] Invalid ASM being generated

2012-05-26 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53327

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||assemble-failure

--- Comment #3 from Andrew Pinski  2012-05-26 
23:57:56 UTC ---
subi,* 1,%r28,%r0


Value not equal to itself

2012-05-26 Thread Jordan Foster
gcc -v; gcc version 4.2.1 20070831 patched [FreeBSD]
uname -srip; FreeBSD 9.0-RELEASE i386 GENERI
Compiler command; gcc47 minimalErroringCode.cpp -o minimalErroringCode
Test; ./minimalErroringCode
Expected; no output
Result; Assertion failed: ((buffer[0] = 0xFF) && buffer[0] == 0xFF),
function main, file minimalErroringCode.cpp, line 4.
#include 
int main() {
  char buffer[1024];
  assert((buffer[0] = 0xFF) && buffer[0] == 0xFF);
  return 0;
}


Re: Value not equal to itself

2012-05-26 Thread Jordan Foster
On 5/26/12, Jordan Foster  wrote:
> gcc -v; gcc version 4.2.1 20070831 patched [FreeBSD]
> uname -srip; FreeBSD 9.0-RELEASE i386 GENERI
> Compiler command; gcc47 minimalErroringCode.cpp -o minimalErroringCode
> Test; ./minimalErroringCode
> Expected; no output
> Result; Assertion failed: ((buffer[0] = 0xFF) && buffer[0] == 0xFF),
> function main, file minimalErroringCode.cpp, line 4.
>
Sorry my bad, sign problem


Re: Value not equal to itself

2012-05-26 Thread Andrew Pinski
On Sat, May 26, 2012 at 8:25 PM, Jordan Foster  wrote:
> gcc -v; gcc version 4.2.1 20070831 patched [FreeBSD]
> uname -srip; FreeBSD 9.0-RELEASE i386 GENERI
> Compiler command; gcc47 minimalErroringCode.cpp -o minimalErroringCode
> Test; ./minimalErroringCode
> Expected; no output
> Result; Assertion failed: ((buffer[0] = 0xFF) && buffer[0] == 0xFF),
> function main, file minimalErroringCode.cpp, line 4.

Easy answer buffer[0] when promoted to int because of the rules of
C/C++, is equal to -1 and not 255.  So a signed char will never equal
to 0xff.

Thanks,
Andrew Pinski