[Bug tree-optimization/50444] [4.6/4.7 Regression] -ftree-sra ignores alignment

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50444

Richard Guenther  changed:

   What|Removed |Added

   Keywords||wrong-code
  Component|c   |tree-optimization
  Known to work||4.5.3
Summary|-ftree-isa ignores  |[4.6/4.7 Regression]
   |alignment   |-ftree-sra ignores
   ||alignment
  Known to fail||4.6.0

--- Comment #6 from Richard Guenther  2011-10-24 
07:54:36 UTC ---
Trunk seems to "work", but surely the issue is latent there.  Regression from
4.5.


[Bug c++/50846] New: internal compiler error in finish_function

2011-10-24 Thread egilb at ife dot no
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50846

 Bug #: 50846
   Summary: internal compiler error in finish_function
Classification: Unclassified
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: eg...@ife.no


Created attachment 25587
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25587
Output from 'c++ -save-temps -c gcc_ice.cpp'

A definition of the funtion __static_initialization_and_destruction_0 in the
translation unit triggers internal compilere error in all versions of gcc.


[Bug c++/48119] -Wtype-limits should warn when bit masking cannot possibly be true due to type size

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48119

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-24
 Ever Confirmed|0   |1

--- Comment #2 from Richard Guenther  2011-10-24 
08:07:35 UTC ---
Sure it is.

// did the value get to big?
if(x & 0x1) {

should be warned about in the frontend before fold get's a chance to
fold it to false (and yes, we do _not_ want to issue warnings from folders...).

Note that from the description of -Wtype-limits it is not clear if we
want to warn here.  Consider templates where usually a load of this
issues can pop up during instantiation.


[Bug c++/50846] internal compiler error in finish_function

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50846

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-24
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2011-10-24 
08:14:56 UTC ---
The __ prefix is reserved for implementation purposes.  Do not use it.

Well.  Confirmed.  We could be "nicer" here and reject the source.


[Bug rtl-optimization/50843] [4.7 Regression] ICE in simplify_subreg, simplify-rtx.c:5417 with -march=pentium3

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50843

Richard Guenther  changed:

   What|Removed |Added

 Target||i?86-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-24
  Known to work||4.6.2
   Target Milestone|--- |4.7.0
Summary|ICE in simplify_subreg, |[4.7 Regression] ICE in
   |simplify-rtx.c:5417 with|simplify_subreg,
   |-march=pentium3 |simplify-rtx.c:5417 with
   ||-march=pentium3
 Ever Confirmed|0   |1

--- Comment #2 from Richard Guenther  2011-10-24 
08:16:38 UTC ---
Confirmed.

#2  0x00b24ad6 in simplify_subreg (outermode=SImode, 
op=0x2ce98470, innermode=SImode, byte=4)
at /space/rguenther/src/svn/trunk/gcc/simplify-rtx.c:5417
5417  gcc_assert (byte < GET_MODE_SIZE (innermode));


[Bug bootstrap/50836] [4.7 regression] bootstrap fails due to error: no previous prototype for 'find_all_hard_reg_sets'

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50836

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0


[Bug tree-optimization/50838] [4.7 Regression] ice in refs_may_alias_p_1 with -O3

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50838

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011-10-24
  Component|c   |tree-optimization
 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org
   |gnu.org |
   Target Milestone|--- |4.7.0
Summary|ice in refs_may_alias_p_1   |[4.7 Regression] ice in
   |with -O3|refs_may_alias_p_1 with -O3
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2011-10-24 
08:27:27 UTC ---
(gdb) p r1
$1 = {ref = 0x2e104000, base = 0x2e104000, offset = 0, size = 64, 
  max_size = 64, ref_alias_set = -1, base_alias_set = -1}
(gdb) p r2
$2 = {ref = 0x2e104030, base = 0x2d787500, offset = 0, size = 64, 
  max_size = 64, ref_alias_set = -1, base_alias_set = -1}
(gdb) call debug_generic_expr (r2->base)
pseudofun_tab.pointer[169]
(gdb) call debug_generic_expr (r1->base)
*(const void * const *) &pseudodata_tab

the first base member is bollocks because the MEM_REF in it isn't
canonicalized:

 
pointer_to_this >
sizes-gimplified public unsigned DI
size 
unit size 
align 64 symtab 0 alias set -1 canonical type 0x2cea6c78 context

pointer_to_this >

arg 0 
sizes-gimplified public unsigned DI size  unit size 
align 64 symtab 0 alias set -1 canonical type 0x2cebd498>
constant
arg 0 

arg 0 
arg 0  arg 1 
../src/spvw.d:2859:36>
arg 1 >>
arg 1 
constant 0>>

Reducing, mine.


[Bug tree-optimization/50789] Gather vectorization

2011-10-24 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50789

--- Comment #5 from Jakub Jelinek  2011-10-24 
08:39:16 UTC ---
Not exactly, -fif-convert-loop-stores is apparently a language changing option,
only a subset of valid C/C++ programs is valid with it.  With V*GATHER* insns,
and, as I found out during the weekend, with VMASKMOVP[SD] and VPMASKMOV[DQ]
instructions too we can handle both conditional loads and conditional stores.
So testcases like:

float a[N], b[N], c[N], d[N], e[N], g[N];

void
f6 (void)
{
  int i;
  for (i = 0; i < N; i++)
e[i] = a[i] < b[i] ? c[i] : d[i];
}

void
f7 (float *p, float *q)
{
  int i;
  for (i = 0; i < N; i++)
e[i] = a[i] < b[i] ? p[i] : q[i];
}

void
f8 (void)
{
  int i;
  for (i = 0; i < N; i++)
{
  float f = c[i] + d[i];
  if (a[i] < b[i])
e[i] = f;
}
}

void
f9 (void)
{
  int i;
  for (i = 0; i < N; i++)
{
  float f = c[i] * d[i];
  if (a[i] < b[i])
e[i] = f;
  else
g[i] = f;
}
}

should be vectorizable (and even with -mavx).  Haven't checked if any other CPU
(PPC, ARM, ...) doesn't have anything similar.
In fact, f6 ought to be vectorizable always, we could easily find out that for
any i that can appear in the loop (0 through 999) c[i] (nor d[i]) will not trap
or fault.  The question is if the same is true for
extern float c[N];
instead (e.g. if the actual definition would be then float c[N / 2];, I'd hope
that it is invalid C though), but for f7 you already can't know if p resp. q
are valid pointers at all, are correctly aligned, and whether e.g. p[i] or q[i]
don't point beyond end of an mmapped region.  So f7/f8/f9 are only vectorizable
using these v*maskmov* instructions (or f7 using v*gather*, but that would be
unnecessary additional overhead).  I've verified that SNB CPUs don't require
any alignment and don't fault on completely invalid addresses with zero mask.

The question is how to represent this in the IL, and IMHO it should be
something that is either present solely during the vectorization (i.e. pattern
recognizer like thing), or that we convert the IL into right before the
vectorizer (e.g. during ifcvt), but convert it back to the original multiple
BBs IL either at the end of the vectorizer or in a pass right after the
vectorizer.  For the conditional loads we could perhaps represent them by
COND_EXPRs with some flag on the gimple which would allow memory instead of
SSA_NAMEs in one or both of the then/else operands or a new tree code, for
conditional stores we'd need a new tree code.


[Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*

2011-10-24 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50598

Iain Sandoe  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-24
 CC||iains at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #5 from Iain Sandoe  2011-10-24 09:12:14 
UTC ---
also responsible for a bunch of fails in libstdc++-v3 30_threads/...


[Bug tree-optimization/50730] SLP vectorization confused by unrelated DRs

2011-10-24 Thread irar at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50730

--- Comment #4 from irar at gcc dot gnu.org 2011-10-24 09:16:57 UTC ---
Author: irar
Date: Mon Oct 24 09:16:53 2011
New Revision: 180367

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

PR tree-optimization/50730
* tree-vect-data-refs.c (vect_analyze_data_refs): Stop basic
block analysis if encountered unsupported data-ref.


Added:
trunk/gcc/testsuite/gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/vect/vect.exp
trunk/gcc/tree-vect-data-refs.c


[Bug tree-optimization/50838] [4.7 Regression] ice in refs_may_alias_p_1 with -O3

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50838

--- Comment #2 from Richard Guenther  2011-10-24 
09:56:02 UTC ---
Reduced testcase, fails with -O -ftree-vectorize:

typedef void * gcv_object_t;
typedef gcv_object_t object;
typedef const void * Pseudofun;
extern struct pseudocode_tab_ {
Pseudofun pseudo_eql;
Pseudofun pseudo_iconv_wcslen;
Pseudofun pseudo_iconv_wcstombs;
Pseudofun pseudo_iconv_range;
}
pseudocode_tab;
extern struct symbol_tab_ {
object pointer[1024];
} pseudofun_tab;
int
init_memory (void)
{
  object* ptr2 = &pseudofun_tab.pointer[0];
  const Pseudofun* ptr1 = (const Pseudofun*)&pseudocode_tab;
  unsigned int count = (sizeof(pseudocode_tab)/sizeof(Pseudofun));
  while (count--)
{
  *ptr2++ = (gcv_object_t)(((unsigned char *)((*ptr1;
  ptr1++;
}
}


[Bug tree-optimization/50847] New: missed diagnostics for dead code.

2011-10-24 Thread pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50847

 Bug #: 50847
   Summary: missed diagnostics for dead code.
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: pl...@agmk.net


int bar()
{
throw 42;
return 0; // dead code
}

void zoo( int& i )
{
return throw -1;
i = 7; // dead code
}

it would be nice to see some (new -Wunused-statement?) warnings for marked
lines.


[Bug c++/50848] New: ICE in derived template class missing using for member of template base class

2011-10-24 Thread cas43 at cs dot stanford.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50848

 Bug #: 50848
   Summary: ICE in derived template class missing using for member
of template base class
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ca...@cs.stanford.edu


Created attachment 25588
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25588
Source file causing ICE

Compiling the attached source file causes g++ to ICE.

Command to reproduce:  /home/cas43/new-gcc/inst/bin/g++ prog.cpp

System type: 64-bit Ubuntu Linux

Compiler version:

$ /home/cas43/new-gcc/inst/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/home/cas43/new-gcc/inst/bin/g++
COLLECT_LTO_WRAPPER=/home/cas43/new-gcc/inst/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../current-gcc/configure --prefix=/home/cas43/new-gcc/inst
Thread model: posix
gcc version 4.7.0 20111024 (experimental) (GCC) 

OUTPUT:

prog.cpp: In member function ‘void B::f()’:
prog.cpp:2:53: error: there are no arguments to ‘u’ that depend on a template
parameter, so a declaration of ‘u’ must be available [-fpermissive]
prog.cpp:2:53: note: (if you use ‘-fpermissive’, G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
prog.cpp: In instantiation of ‘void B::f() [with T = int]’:
prog.cpp:3:16:   required from here
prog.cpp:2:50: error: ‘u’ was not declared in this scope, and no declarations
were found by argument-dependent lookup at the point of instantiation
[-fpermissive]
prog.cpp:2:50: internal compiler error: tree check: expected tree that contains
‘decl minimal’ structure, have ‘indirect_ref’ in tsubst_copy_and_build, at
cp/pt.c:13526
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


[Bug tree-optimization/50849] New: long long right shift not vectorized

2011-10-24 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50849

 Bug #: 50849
   Summary: long long  right shift not vectorized
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: vincenzo.innoce...@cern.ch


Any reason why left shift is vectorized and right shift not?

long long l1[1024], l2[1024];
void sl() {
  for (int i=0;i!=1024;++i)
l1[i] = l2[i]<<52;
}

void rl() {
  for (int i=0;i!=1024;++i)
l1[i] = l2[i]>>52;
}


sl():
leaq_l1(%rip),%rcx
xorl%eax,%eax
leaq_l2(%rip),%rdx
movdqa(%rdx,%rax),%xmm0
psllq$0x34,%xmm0
movdqa%xmm0,(%rcx,%rax)
addq$0x10,%rax
cmpq$0x2000,%eax
jne0x0010
repz/ret
nopl(%rax)
rl():
leaq_l1(%rip),%rsi
xorl%eax,%eax
leaq_l2(%rip),%rcx
movq(%rcx,%rax),%rdx
sarq$0x34,%rdx
movq%rdx,(%rsi,%rax)
addq$0x08,%rax
cmpq$0x2000,%eax
jne0x0040
repz/ret


[Bug tree-optimization/50763] [4.7 Regression] ICE: verify_gimple failed: missing PHI def with -ftree-tail-merge

2011-10-24 Thread belyshev at depni dot sinp.msu.ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50763

Serge Belyshev  changed:

   What|Removed |Added

 CC||belyshev at depni dot
   ||sinp.msu.ru

--- Comment #10 from Serge Belyshev  
2011-10-24 10:39:07 UTC ---
The commit r180341 breaks i686 bootstrap for me with verify_ssa failure. Here
is a reduced testcase, fails also on x86_64, compile with -O2:

--
typedef union tree_node *tree;

struct tree_base
{
  int code;
};

struct tree_typed
{
  struct tree_base base;
  tree type;
};

struct tree_common
{
  struct tree_typed typed;
};

struct tree_type_common
{
  tree main_variant;
};

union tree_node
{
  struct tree_base base;
  struct tree_typed typed;
  struct tree_type_common type_common;
};

int std_canonical_va_list_type (tree type) 
{
  if (type->base.code)
type = type->typed.type;
  else
if (type->typed.type->base.code)
  type = type->typed.type;

  if (type->type_common.main_variant)
return 1;

  return 0;
}
--
bug.c: In function 'std_canonical_va_list_type':
bug.c:31:5: error: definition in block 3 does not dominate use in block 4
for SSA_NAME: .MEM_18 in statement:
.MEM_18 = PHI <.MEM_12(D)(2), .MEM_18(4)>
PHI argument
.MEM_18
for PHI node
.MEM_18 = PHI <.MEM_12(D)(2), .MEM_18(4)>
bug.c:31:5: internal compiler error: verify_ssa failed


[Bug tree-optimization/50763] [4.7 Regression] ICE: verify_gimple failed: missing PHI def with -ftree-tail-merge

2011-10-24 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50763

vries at gcc dot gnu.org changed:

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
 Resolution|FIXED   |

--- Comment #11 from vries at gcc dot gnu.org 2011-10-24 10:59:24 UTC ---
reopened due to comment 10.


[Bug bootstrap/50836] [4.7 regression] bootstrap fails due to error: no previous prototype for 'find_all_hard_reg_sets'

2011-10-24 Thread bernds at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50836

--- Comment #2 from Bernd Schmidt  2011-10-24 
11:03:16 UTC ---
Author: bernds
Date: Mon Oct 24 11:03:12 2011
New Revision: 180376

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180376
Log:
PR bootstrap/50836
* rtlanal.c: Swap includes of "hard-reg-set.h" and "rtl.h".

Modified:
trunk/gcc/ChangeLog
trunk/gcc/rtlanal.c


[Bug tree-optimization/50849] long long right shift not vectorized

2011-10-24 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50849

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  2011-10-24 
11:20:47 UTC ---
Because there is no such instruction?
There is {,v}psll{w,d,q}, {,v}psrl{w,d,q} and {,v}psra{w,d} but not
{,v}psraq.
To replace the non-existing vpsraq $52, %xmm1, %xmm0, we'd have to do something
like vpcmpeq %%xmm1, %xmm1, %xmm2; vpcmpgt %%xmm1, %xmm2, %xmm2; vpsraq $52,
%xmm1, %xmm0; vpsllq $(64 - 52), %xmm2, %xmm2; vpor %xmm2, %xmm0, %xmm0
(where the first insn could be hoisted out of the loop, it is setting the
register to all ones mask).  I.e. basically
the ((long long) x >> cnt shift do as
(((unsigned long long) x) >> cnt) | ((long long) x < 0 ? -1ULL << (64 - cnt) :
0).


[Bug bootstrap/50686] [4.7 regression] IRIX 6.5 bootstrap failure: ICE in in lookup_cfa_1, at dwarf2cfi.c:595

2011-10-24 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50686

--- Comment #18 from ro at CeBiTec dot Uni-Bielefeld.DE  2011-10-24 11:43:38 UTC ---
Bernd,

could you make some progress on this PR?  IRIX bootstrap is broken for
more than two weeks now.

Thanks.
Rainer


[Bug rtl-optimization/50833] ICE: in maybe_record_trace_start, at dwarf2cfi.c:2243 with -fshrink-wrap

2011-10-24 Thread bernds at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50833

--- Comment #1 from Bernd Schmidt  2011-10-24 
11:46:09 UTC ---
Author: bernds
Date: Mon Oct 24 11:46:04 2011
New Revision: 180377

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180377
Log:
PR rtl-optimization/50833
* function.c (thread_prologue_and_epilogue_insns): Expect the
return insn optimization only if optimize.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/function.c


[Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format

2011-10-24 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

--- Comment #8 from Georg-Johann Lay  2011-10-24 
11:53:16 UTC ---
(In reply to comment #7)
> Compile it as:
> 
> $avr-gcc -mmcu=atxmega128a1 -g -gdwarf-2 test.c -S

You are left alone with that: -mmcu=atxmega128a1 is not supported.

See avr-gcc --target-help for a list of supported devices.


[Bug tree-optimization/50849] long long right shift not vectorized

2011-10-24 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50849

vincenzo Innocente  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #2 from vincenzo Innocente  
2011-10-24 11:55:14 UTC ---
Thanks for the fast feedback.
I used long long and for right shift gcc generates an arithmetic one.
with unsigned long long it generates psrlq.
sorry for the noise.


[Bug c/50850] New: verify_ssa failed

2011-10-24 Thread maxdeliso at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50850

 Bug #: 50850
   Summary: verify_ssa failed
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: maxdel...@gmail.com


Created attachment 25589
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25589
the preprocessed gfs2 file.c with triggers the bug

Bug Report
Date: Mon Oct 24 07:56:29 EDT 2011
System Info
gcc version: 4.7.0 20111024 (experimental) (GCC) 
uname -a: Linux koplaix 3.1.0-rc10+ #3 SMP Sat Oct 22 19:22:40 EDT 2011
x86_64 GNU/Linux

Bug Info
compiler output: 
  fs/gfs2/file.c: In function ‘gfs2_set_inode_flags’:
  fs/gfs2/file.c:172:6: error: definition in block 3 does not dominate use
in block 2
  for SSA_NAME: .MEM_32 in statement:
  .MEM_32 = PHI <.MEM_32(2)>
  PHI argument
  .MEM_32
  for PHI node
  .MEM_32 = PHI <.MEM_32(2)>
  fs/gfs2/file.c:172:6: internal compiler error: verify_ssa failed
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <http://gcc.gnu.org/bugs.html> for instructions.
on git kernel commit: c3b92c8787367a8bb53d57d9789b558f1295cc96
triggering commandline:
  gcc -Wp,-MD,fs/gfs2/.file.o.d  -nostdinc -isystem
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include
-I/home/maxx/src/linux-2.6/arch/x86/include -Iarch/x86/include/generated
-Iinclude  -include /home/maxx/src/linux-2.6/include/linux/kconfig.h
-D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
-Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -march=core2
-mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1
-DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables
-mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048
-fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer
-Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
-fconserve-stack -DCC_HAVE_ASM_GOTO -Ifs/gfs2  -DMODULE  -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(file)"  -D"KBUILD_MODNAME=KBUILD_STR(gfs2)" -c -o
fs/gfs2/file.o fs/gfs2/file.c
(preprocessed file attached as file.i)


[Bug tree-optimization/50763] [4.7 Regression] ICE: verify_gimple failed: missing PHI def with -ftree-tail-merge

2011-10-24 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50763

--- Comment #12 from vries at gcc dot gnu.org 2011-10-24 12:06:19 UTC ---
Created attachment 25590
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25590
proposed patch for problem reported in comment 10

2011-10-24  Tom de Vries  

PR tree-optimization/50763
* tree-ssa-tail-merge.c (replace_block_by): Update vops if phi_vuse1 or
phi_vuse2 is NULL_TREE only if bb1 dominates or is dominated by bb2.

* gcc.dg/pr50763-2.c: New test.


[Bug bootstrap/50686] [4.7 regression] IRIX 6.5 bootstrap failure: ICE in in lookup_cfa_1, at dwarf2cfi.c:595

2011-10-24 Thread bernds at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50686

--- Comment #19 from Bernd Schmidt  2011-10-24 
12:10:21 UTC ---
It's really hard to run a gdb session this way. You're not a gcc newbie, and
you're the only one with an IRIX machine - can you not debug a bit further from
where we are now? You'll have to figure out why we get to that point twice with
the same data - this is making no sense to me. Check whether it's the same
loop, or (unlikely) two calls to connect_traces. If it's the same loop, what
are the indices? What's the contentes of the VEC? etc.


[Bug target/50820] [avr] Use EIND consistently

2011-10-24 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50820

--- Comment #3 from Georg-Johann Lay  2011-10-24 
12:22:25 UTC ---
Author: gjl
Date: Mon Oct 24 12:22:21 2011
New Revision: 180379

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180379
Log:
PR target/50820
* doc/invoke.texi (AVR Options): New subsubsection to explain EIND
handling and indirect jump/calls on devices > 128k.


Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/doc/invoke.texi


[Bug c++/50851] New: ICE: verify_ssa failed, definition in block x does not dominate use in block y with -O2

2011-10-24 Thread cas43 at cs dot stanford.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50851

 Bug #: 50851
   Summary: ICE: verify_ssa failed, definition in block x does not
dominate use in block y with -O2
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ca...@cs.stanford.edu


Created attachment 25591
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25591
Source file causing ICE

Compilation of the attached file with -O2 causes ICE.

Compiler output:

prog.cpp: In member function ‘void
ANGLE_JOINT::Constrain_Angles(VECTOR&) const [with TV = int]’:
prog.cpp:7:10: error: definition in block 5 does not dominate use in block 3
for SSA_NAME: .MEM_12 in statement:
.MEM_12 = PHI <.MEM_8(D)(2), .MEM_12(3)>
PHI argument
.MEM_12
for PHI node
.MEM_12 = PHI <.MEM_8(D)(2), .MEM_12(3)>
prog.cpp:7:10: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

How to reproduce: /home/cas43/new-gcc/inst/bin/g++ prog.cpp -O2

Compiler version:

/home/cas43/new-gcc/inst/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/home/cas43/new-gcc/inst/bin/g++
COLLECT_LTO_WRAPPER=/home/cas43/new-gcc/inst/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../current-gcc/configure --prefix=/home/cas43/new-gcc/inst
Thread model: posix
gcc version 4.7.0 20111024 (experimental) (GCC)


[Bug tree-optimization/50838] [4.7 Regression] ice in refs_may_alias_p_1 with -O3

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50838

--- Comment #3 from Richard Guenther  2011-10-24 
12:31:06 UTC ---
Author: rguenth
Date: Mon Oct 24 12:31:01 2011
New Revision: 180381

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180381
Log:
2011-10-24  Richard Guenther  

PR tree-optimization/50838
* tree-data-ref.c (dr_analyze_indices): Properly canonicalize
a MEM_REF base if we change it.

* gcc.dg/torture/pr50838.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr50838.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-data-ref.c


[Bug c++/50810] c++0x-compat does not warn about narrowing conversions

2011-10-24 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50810

--- Comment #18 from Manuel López-Ibáñez  2011-10-24 
12:35:49 UTC ---
Paolo, I am sorry to say it so bluntly but this solution is nonsense:

http://gcc.gnu.org/ml/gcc-patches/2011-10/msg02160.html

I know it is what Gabriel requested, but it doesn't make sense.

* It doesn't make sense to have a warning conditional of an option when the
negated option cannot disable it. Just don't give it any option then.

* It doesn't make sense that the warning is emitted with option Wnarrowing but
it is disabled by option -Wno-c++0x-compat. This also breaks consistency with
the pragmas and with -Werror=c++0x-compat versus -Werror=narrowing.

* It doesn't make sense to force users to see a warning when they have
requested to not see it using -Wno-narrowing!

Honestly, listen to Jason's stated opinion here:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49793#c2

This PR is only about adding -Wnarrowing to -Wc++0x-compat to get a warning
when not using -std=c++0x. Nothing else. It was fixed by your first patch (plus
not enabling -Wc++0x-compat with -Wall). If you have asked Jason, that patch
would have been pre-approved and committed long ago!


[Bug c++/50852] New: ICE: internal compiler error: in tsubst, at cp/pt.c:11030

2011-10-24 Thread cas43 at cs dot stanford.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50852

 Bug #: 50852
   Summary: ICE: internal compiler error: in tsubst, at
cp/pt.c:11030
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ca...@cs.stanford.edu


Created attachment 25592
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25592
Compiling this file causes ICE

ICE on compiling attached file.

How to reproduce: /home/cas43/new-gcc/inst/bin/g++ prog.ii

Diagnostic:

prog.cpp: In instantiation of ‘class D >, 3>’:
prog.cpp:13:16:   required from here
prog.cpp:11:23: internal compiler error: in tsubst, at cp/pt.c:11030
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Compiler version:

/home/cas43/new-gcc/inst/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/home/cas43/new-gcc/inst/bin/g++
COLLECT_LTO_WRAPPER=/home/cas43/new-gcc/inst/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../current-gcc/configure --prefix=/home/cas43/new-gcc/inst
Thread model: posix
gcc version 4.7.0 20111024 (experimental) (GCC)


[Bug c++/50853] New: Internal Compiler Error returning a template type using brace initialization

2011-10-24 Thread public at alisdairm dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853

 Bug #: 50853
   Summary: Internal Compiler Error returning a template type
using brace initialization
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: pub...@alisdairm.net


The following obscure code produces an ICE when the function template 'test' is
called:


template struct MyType{};

template
auto test(MyType) -> MyType { return {}; }

int main() {
   MyType{};
   test( MyType<256>{} );  // no error without this call
}

The ICE produced is:

internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13389


[Bug rtl-optimization/38644] [4.4/4.5/4.6/4.7 Regression] Optimization flag -O1 -fschedule-insns2 causes wrong code

2011-10-24 Thread sebastian.hu...@embedded-brains.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644

--- Comment #53 from Sebastian Huber  
2011-10-24 13:06:03 UTC ---
I tested the above patch proposed by Mikael Pettersson (from 2010-05-26, more
than one year ago) with GCC 4.6 20111021.  It still fixes the test case
provided by Dave Murphy (from 2008-12-27, nearly three years ago).  I run the
GCC C and C++ testsuite with the arm-rtemseabi4.11 target and the results are
identical with and without the patch.  Even if we have no perfect solution yet,
it would be very kind if someone can check in an intermediate fix.


[Bug bootstrap/50836] [4.7 regression] bootstrap fails due to error: no previous prototype for 'find_all_hard_reg_sets'

2011-10-24 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50836

Mikael Pettersson  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #3 from Mikael Pettersson  2011-10-24 
13:07:25 UTC ---
Fixed.

To clarify, the problem occured because the C and C++ front-ends differ with
regard to -Wmissing-prototypes (the C++ FE doesn't have it).  People building
stage2/3 in C++ mode won't see the error (but will see a warning in stage1),
but people building in proper C mode (--disable-build-poststage1-with-cxx) will
see the error.


[Bug c++/50854] New: internal compiler error: verify_ssa failed

2011-10-24 Thread mario-baumann at web dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50854

 Bug #: 50854
   Summary: internal compiler error: verify_ssa failed
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mario-baum...@web.de


Created attachment 25593
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25593
c++ source

Hi all,

compiling of attached c++ source failed with optimisation -O2. It works fine
with -O1 and -O0.

Mario.

> g++ -c -m32 -O2 goo.cxx
goo.cxx: In member function 'long int sExt::evalPoint(const v2d&, v3d&) const':
goo.cxx:47:6: error: definition in block 3 does not dominate use in block 2
for SSA_NAME: .MEM_15 in statement:
.MEM_15 = PHI <.MEM_15(2)>
PHI argument
.MEM_15
for PHI node
.MEM_15 = PHI <.MEM_15(2)>
goo.cxx:47:6: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

---
> uname -a
Linux ahsoka.intec.dom 2.6.32-131.17.1.el6.x86_64 #1 SMP Thu Sep 29 10:24:25
EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

> rpm -qa "glibc*" | grep -e 'glibc-[0-9]' | sort -u
glibc-2.12-1.25.el6_1.3.i686
glibc-2.12-1.25.el6_1.3.x86_64

> g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/app2/gcc/4.7.0-20111024-svn180364/i686/libexec/gcc/i686-unknown-linux-gnu/4.7.0/lto-wrapper
Target: i686-unknown-linux-gnu
Configured with: ./configure --prefix=/app2/gcc/4.7.0-20111024-svn180364/i686
--enable-languages=c,c++,fortran --disable-nls
--with-gmp=/app2/gcc/4.7.0-20111024-svn180364/i686/aux
--with-mpfr=/app2/gcc/4.7.0-20111024-svn180364/i686/aux
--with-mpc=/app2/gcc/4.7.0-20111024-svn180364/i686/aux
--with-ppl=/app2/gcc/4.7.0-20111024-svn180364/i686/aux
--with-cloog=/app2/gcc/4.7.0-20111024-svn180364/i686/aux --disable-multilib
--build=i686-unknown-linux-gnu
Thread model: posix
gcc version 4.7.0 20111024 (experimental) (GCC) 

> ld -v
GNU ld (GNU Binutils) 2.21.52.20110714


[Bug tree-optimization/50838] [4.7 Regression] ice in refs_may_alias_p_1 with -O3

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50838

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Richard Guenther  2011-10-24 
13:13:02 UTC ---
Fixed.


[Bug c++/50853] Internal Compiler Error returning a template type using brace initialization

2011-10-24 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853

--- Comment #1 from Jonathan Wakely  2011-10-24 
13:25:25 UTC ---
I get:  sorry, unimplemented: mangling constructor


[Bug c++/50854] internal compiler error: verify_ssa failed

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50854

Paolo Carlini  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #1 from Paolo Carlini  2011-10-24 
13:44:15 UTC ---
Richard, can you check if this is really a C++ issue? Thanks.


[Bug c++/50853] [C++0x] Internal Compiler Error returning a template type using brace initialization

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853

Paolo Carlini  changed:

   What|Removed |Added

Summary|Internal Compiler Error |[C++0x] Internal Compiler
   |returning a template type   |Error returning a template
   |using brace initialization  |type using brace
   ||initialization

--- Comment #2 from Paolo Carlini  2011-10-24 
13:46:42 UTC ---
Likewise here.


[Bug c++/50851] ICE: verify_ssa failed, definition in block x does not dominate use in block y with -O2

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50851

Paolo Carlini  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #1 from Paolo Carlini  2011-10-24 
13:48:32 UTC ---
And this one too, doesn't look like a C++ issue.


[Bug tree-optimization/50851] [4.7 Regression] ICE: verify_ssa failed, definition in block x does not dominate use in block y with -O2

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50851

Richard Guenther  changed:

   What|Removed |Added

  Component|c++ |tree-optimization
   Target Milestone|--- |4.7.0
Summary|ICE: verify_ssa failed, |[4.7 Regression] ICE:
   |definition in block x does  |verify_ssa failed,
   |not dominate use in block y |definition in block x does
   |with -O2|not dominate use in block y
   ||with -O2


[Bug tree-optimization/50850] [4.7 Regression] verify_ssa failed

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50850

Richard Guenther  changed:

   What|Removed |Added

  Component|c   |tree-optimization
   Target Milestone|--- |4.7.0
Summary|verify_ssa failed   |[4.7 Regression] verify_ssa
   ||failed


[Bug tree-optimization/50854] [4.7 Regression] internal compiler error: verify_ssa failed

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50854

Richard Guenther  changed:

   What|Removed |Added

 CC|rguenth at gcc dot gnu.org  |
  Component|c++ |tree-optimization
   Target Milestone|--- |4.7.0
Summary|internal compiler error:|[4.7 Regression] internal
   |verify_ssa failed   |compiler error: verify_ssa
   ||failed


[Bug c++/50855] New: Name mangling for late return types invoking constructors not implemented

2011-10-24 Thread public at alisdairm dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50855

 Bug #: 50855
   Summary: Name mangling for late return types invoking
constructors not implemented
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: pub...@alisdairm.net


Jason suggested I file the issue, even though the error message indicates a
known limitation.

The following code yields the error:
main.cpp: In instantiation of 'decltype ({256}) test(const T&) [with T = char,
decltype ({256}) = char]':
main.cpp:8:14:   instantiated from here
main.cpp:2:6: sorry, unimplemented: mangling constructor



template
auto test(T const &) -> decltype(T{256}) {
   return T{};
}

int main() {
   char c = 42;
   c = test(c);
}


[Bug c++/50855] [C++0x] Name mangling for late return types invoking constructors not implemented

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50855

Paolo Carlini  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org
Summary|Name mangling for late  |[C++0x] Name mangling for
   |return types invoking   |late return types invoking
   |constructors not|constructors not
   |implemented |implemented

--- Comment #1 from Paolo Carlini  2011-10-24 
14:02:03 UTC ---
Is it really the same as PR50853?


[Bug c++/50853] [C++0x] Internal Compiler Error returning a template type using brace initialization

2011-10-24 Thread public at alisdairm dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853

--- Comment #3 from Alisdair Meredith  2011-10-24 
14:02:22 UTC ---
The original report was compiled with gcc 4.6.1 supplied by MacPorts.  Could
you confirm if the not-supported error message occurs in trunk, or a separately
compiled gcc 4.6.1?


[Bug c++/50852] [4.6/4.7 Regression] ICE: internal compiler error: in tsubst, at cp/pt.c:11030

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50852

Paolo Carlini  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-24
Summary|ICE: internal compiler  |[4.6/4.7 Regression] ICE:
   |error: in tsubst, at|internal compiler error: in
   |cp/pt.c:11030   |tsubst, at cp/pt.c:11030
 Ever Confirmed|0   |1

--- Comment #1 from Paolo Carlini  2011-10-24 
14:06:03 UTC ---
Apparently 4.5.x didn't crash.


[Bug c++/50853] [C++0x] Internal Compiler Error returning a template type using brace initialization

2011-10-24 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853

--- Comment #4 from Jonathan Wakely  2011-10-24 
14:06:26 UTC ---
The 4.6.1 release and trunk both give the error I quoted.

What does 'gcc -v' show for your compiler?
(that info should be in the report anyway! ;)


[Bug c++/50855] [C++0x] Name mangling for late return types invoking constructors not implemented

2011-10-24 Thread public at alisdairm dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50855

--- Comment #2 from Alisdair Meredith  2011-10-24 
14:06:55 UTC ---
It might be.  I still see an ICE for PR50853, but if that is giving the same
error now, then it is probably the same root cause.  I'm still waiting to hear
if I have an issue with my specific build of 4.6.1, or if PR50853 hits an issue
since cleaned up in the trunk.


[Bug c++/50853] [C++0x] Internal Compiler Error returning a template type using brace initialization

2011-10-24 Thread public at alisdairm dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853

--- Comment #5 from Alisdair Meredith  2011-10-24 
14:10:38 UTC ---
Using built-in specs.
COLLECT_GCC=gcc-mp-4.6
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin10/4.6.1/lto-wrapper
Target: x86_64-apple-darwin10
Configured with: ../gcc-4.6-20110325/configure --prefix=/opt/local
--build=x86_64-apple-darwin10 --enable-languages=c,c++,objc,obj-c++
--libdir=/opt/local/lib/gcc46 --includedir=/opt/local/include/gcc46
--infodir=/opt/local/share/info --mandir=/opt/local/share/man
--datarootdir=/opt/local/share/gcc-4.6 --with-local-prefix=/opt/local
--with-system-zlib --disable-nls --program-suffix=-mp-4.6
--with-gxx-include-dir=/opt/local/include/gcc46/c++/ --with-gmp=/opt/local
--with-mpfr=/opt/local --with-mpc=/opt/local --enable-stage1-checking
--disable-multilib --enable-fully-dynamic-string
Thread model: posix
gcc version 4.6.1 20110325 (prerelease) (GCC) 


Hmm, that 'pre-rerelease' tag is annoying - the MacPorts port file updated to
suggest this is the release version, rather than the release candidate.

Sounds like I have a bad version, anyway.  Sorry for the noise.


[Bug c++/50855] [C++0x] Name mangling for late return types invoking constructors not implemented

2011-10-24 Thread public at alisdairm dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50855

--- Comment #3 from Alisdair Meredith  2011-10-24 
14:13:31 UTC ---
And just to confirm - it sounds like the ICE in PR50853 is a bad compiler at my
end.  I suggest keeping *this* PR open, as at least it reports the correct
error!


[Bug c++/50853] [C++0x] Internal Compiler Error returning a template type using brace initialization

2011-10-24 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to work||4.6.1, 4.7.0
 Resolution||FIXED
   Target Milestone|--- |4.6.1
  Known to fail||4.6.0

--- Comment #6 from Jonathan Wakely  2011-10-24 
14:20:55 UTC ---
ah yes, get the ICE with 4.6.0 so this appears to have been fixed for 4.6.1


[Bug c++/50853] [C++0x] Internal Compiler Error returning a template type using brace initialization

2011-10-24 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853

--- Comment #7 from Jonathan Wakely  2011-10-24 
14:22:51 UTC ---
actually, I guess I was a bit hasty closing it ... there's no ICE but it still
fails to compile - should we reopen?


[Bug c++/50853] [C++0x] Internal Compiler Error returning a template type using brace initialization

2011-10-24 Thread public at alisdairm dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50853

--- Comment #8 from Alisdair Meredith  2011-10-24 
14:27:18 UTC ---
I am happy with closed - the ICE is resolved an PR50855 reports the
unimplemented error message, with (hopefully) a simpler test case.

It might be worth re-testing once PR50855 is resolved, just to be sure though.


[Bug c++/50848] [4.7 Regression] ICE in derived template class missing using for member of template base class

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50848

Paolo Carlini  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-24
Summary|ICE in derived template |[4.7 Regression] ICE in
   |class missing using for |derived template class
   |member of template base |missing using for member of
   |class   |template base class
 Ever Confirmed|0   |1

--- Comment #1 from Paolo Carlini  2011-10-24 
14:30:21 UTC ---
Only mainline ICEs.


[Bug target/28854] unwinder reports sentinel frame.

2011-10-24 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28854

--- Comment #5 from Uros Bizjak  2011-10-24 14:44:49 
UTC ---
Just FYI, this is due to the fact that _start from /usr/crt1.o has a FDE:

$ objdump --dwarf  /usr/lib/crt1.o 

/usr/lib/crt1.o: file format elf64-alpha

Contents of the .eh_frame section:

 0010  CIE
  Version:   1
  Augmentation:  "zR"
  Code alignment factor: 4
  Data alignment factor: -8
  Return address column: 15
  Augmentation data: 1b

  DW_CFA_def_cfa_register: r30
  DW_CFA_nop

0014 0010 0018 FDE cie= pc=..003c
  DW_CFA_advance_loc: 20 to 0014
  DW_CFA_def_cfa_register: r15

This FDE of _start function is discovered by uw_frame_state_for, and only after
this recursion

  if (context->ra == 0)
return _URC_END_OF_STACK;

is triggered.

So if there is a bug at all, it is in glibc - perhaps_start should not set FDE.


[Bug target/49824] [avr] Missing documentation for OS_task and OS_main attributes

2011-10-24 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49824

--- Comment #2 from Georg-Johann Lay  2011-10-24 
14:46:02 UTC ---
Author: gjl
Date: Mon Oct 24 14:45:51 2011
New Revision: 180385

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180385
Log:
PR target/49824
* doc/extend.texi (Declaring Attributes of Functions):
Document OS_main and OS_task attributes.
(Specifying Attributes of Variables): Move up
subsection "AVR Variable Attributes" as of alphabetical order.


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


[Bug target/50820] [avr] Use EIND consistently

2011-10-24 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50820

--- Comment #4 from Georg-Johann Lay  2011-10-24 
14:49:55 UTC ---
Author: gjl
Date: Mon Oct 24 14:49:47 2011
New Revision: 180388

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180388
Log:
PR target/50820
Port from 4.6 branch r180379
* doc/invoke.texi (AVR Options): New subsubsection to explain EIND
handling and indirect jump/calls on devices > 128k.


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


[Bug target/50856] New: ARM: suboptimal code for absolute difference calculation

2011-10-24 Thread siarhei.siamashka at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50856

 Bug #: 50856
   Summary: ARM: suboptimal code for absolute difference
calculation
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: siarhei.siamas...@gmail.com


gcc generates suboptimal code on ARM for "abs(a - b)" type of operation, which
is used for example in paeth png filter: http://www.w3.org/TR/PNG-Filters.html

Given the following test code:


int absolute_difference1(unsigned char a, unsigned char b)
{
return a > b ? a - b : b - a;
}

int absolute_difference2(unsigned char a, unsigned char b)
{
int tmp = a;
if ((tmp -= b) < 0)
tmp = -tmp;
return tmp;
}


The current gcc svn trunk (r180383) generates the following code for -O2 and
-Os optimizations:

.cpu arm10tdmi
.eabi_attribute 27, 3
.eabi_attribute 28, 1
.fpu vfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 4
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file   "test.c"
.text
.align  2
.global absolute_difference1
.type   absolute_difference1, %function
absolute_difference1:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
cmp r0, r1
rsbhi   r0, r1, r0
rsbls   r0, r0, r1
bx  lr
.size   absolute_difference1, .-absolute_difference1
.align  2
.global absolute_difference2
.type   absolute_difference2, %function
absolute_difference2:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
rsb r0, r1, r0
cmp r0, #0
rsblt   r0, r0, #0
bx  lr
.size   absolute_difference2, .-absolute_difference2
.ident  "GCC: (GNU) 4.7.0 20111024 (experimental)"
.section.note.GNU-stack,"",%progbits

Even in the quite explicit second code variant ('absolute_difference2'
function), gcc does not generate the expected SUBS + NEGLT pair of
instructions. Also for ARMv6 capable processors even a single USAD8 instruction
could be used here if both operands are known to have values in [0-255] range
and if high latency of this instruction can be hidden.


[Bug target/49824] [avr] Missing documentation for OS_task and OS_main attributes

2011-10-24 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49824

--- Comment #3 from Georg-Johann Lay  2011-10-24 
14:55:53 UTC ---
Author: gjl
Date: Mon Oct 24 14:55:45 2011
New Revision: 180390

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180390
Log:
PR target/49824
Backport from mainline r180385
* doc/extend.texi (Declaring Attributes of Functions):
Document OS_main and OS_task attributes.
(Specifying Attributes of Variables): Move up
subsection "AVR Variable Attributes" as of alphabetical order.


Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/doc/extend.texi


[Bug target/49824] [avr] Missing documentation for OS_task and OS_main attributes

2011-10-24 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49824

Georg-Johann Lay  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|4.4.7   |4.6.2

--- Comment #4 from Georg-Johann Lay  2011-10-24 
14:57:15 UTC ---
Closed for 4.6.2


[Bug target/50820] [avr] Use EIND consistently

2011-10-24 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50820

Georg-Johann Lay  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #5 from Georg-Johann Lay  2011-10-24 
14:58:24 UTC ---
Closed in 4.6.2


[Bug bootstrap/50857] New: [4.7 Regression] The compiler is built with exceptions and RTTI enabled

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50857

 Bug #: 50857
   Summary: [4.7 Regression] The compiler is built with exceptions
and RTTI enabled
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rgue...@gcc.gnu.org
CC: i...@google.com


We fail to pass -fno-exceptions -fno-rtti to g++ for stage2 and stage3 building
the host binaries.  That leads to increased compile-time and possibly runtime.

Ian, does Go need exceptions or RTTI?

Any idea where to best fix this?


[Bug bootstrap/50857] [4.7 Regression] The compiler is built with exceptions and RTTI enabled

2011-10-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50857

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0


[Bug bootstrap/50857] [4.7 Regression] The compiler is built with exceptions and RTTI enabled

2011-10-24 Thread ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50857

Ian Lance Taylor  changed:

   What|Removed |Added

 CC||ian at airs dot com

--- Comment #1 from Ian Lance Taylor  2011-10-24 16:44:25 
UTC ---
The Go frontend does not use exceptions or RTTI.

The place to add new C++-specific options to be used when building gcc code is
ALL_CXXFLAGS in gcc/Makefile.in.  The thing to be careful of is that that
Makefile variable is used for any C++ compiler.  Ideally there would be a
configure test to see whether the compiler supported the options.  This can be
done along the lines of ACX_PROG_CC_WARNING_OPTS in configure.ac.  In fact you
can probably just use ACX_PROG_CC_WARNING_OPTS despite the name.


[Bug rtl-optimization/50843] [4.7 Regression] ICE in simplify_subreg, simplify-rtx.c:5417 with -march=pentium3

2011-10-24 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50843

--- Comment #3 from Diego Novillo  2011-10-24 
17:07:54 UTC ---
This was working as of trunk rev 178998.


[Bug target/50856] ARM: suboptimal code for absolute difference calculation

2011-10-24 Thread rearnsha at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50856

Richard Earnshaw  changed:

   What|Removed |Added

 Target||arm
   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-24
 Ever Confirmed|0   |1

--- Comment #1 from Richard Earnshaw  2011-10-24 
17:13:14 UTC ---
Confirmed.  With the second case we get quite close to getting it right (having
detected that there is an ABS expression, but we fail to merge it with the
original subtract.


[Bug rtl-optimization/50843] [4.7 Regression] ICE in simplify_subreg, simplify-rtx.c:5417 with -march=pentium3

2011-10-24 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50843

Uros Bizjak  changed:

   What|Removed |Added

 CC||rth at gcc dot gnu.org

--- Comment #4 from Uros Bizjak  2011-10-24 17:36:17 
UTC ---
r179952: OK
r179958: Fail

03:31 r179958 - in /trunk/gcc: ChangeLog doc/md.texi ... rth
03:27 r179957 - in /trunk/gcc: ChangeLog config/rs600... rth
03:25 r179956 - in /trunk/gcc: ChangeLog optabs.c tes... rth
03:20 r179955 - in /trunk/gcc: ChangeLog config/i386/... rth
03:18 r179954 - in /trunk/gcc: ChangeLog config/spu/s... rth
03:17 r179953 - in /trunk/gcc: ChangeLog config/rs600... rth
00:18 r179952 - /trunk/gcc/DATESTAMP gccadmin

See also PR 50731.


[Bug middle-end/50731] [4.7 Regression] FAIL: gcc.dg/torture/vector-shift2.c

2011-10-24 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50731

--- Comment #4 from Uros Bizjak  2011-10-24 17:39:09 
UTC ---
Revision 179958 FAILs.


[Bug tree-optimization/50850] [4.7 Regression] verify_ssa failed

2011-10-24 Thread belyshev at depni dot sinp.msu.ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50850

--- Comment #1 from Serge Belyshev  
2011-10-24 17:57:09 UTC ---
Most likely dup of bug 50763 (see if reverting r180341 or applying patch from
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50763#c12 helps).


[Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format

2011-10-24 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

--- Comment #9 from Jakub Jelinek  2011-10-24 
18:09:24 UTC ---
Author: jakub
Date: Mon Oct 24 18:09:21 2011
New Revision: 180398

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180398
Log:
PR debug/50816
* dwarf2out.c (dwarf2out_source_line): Emit discriminators only if
-gdwarf-4 or not -gstrict-dwarf.

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


[Bug target/50182] Performance degradation from gcc 4.1 (x86_64)

2011-10-24 Thread oleg at smolsky dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182

--- Comment #16 from oleg at smolsky dot net 2011-10-24 18:27:28 UTC ---
$ /work/tools/gcc47/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/work/tools/gcc47/bin/g++
COLLECT_LTO_WRAPPER=/work/tools/gcc47/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7/configure --prefix=/work/tools/gcc47 
--enable-languages=c,c++ --with-system-zlib 
--with-mpfr=/work/tools/mpfr24 --with-gmp=/work/tools/gmp 
--with-mpc=/work/tools/mpc 
LD_LIBRARY_PATH=/work/tools/mpfr/lib24:/work/tools/gmp/lib:/work/tools/mpc/lib
Thread model: posix
gcc version 4.7.0 20111001 (experimental) (GCC)

The test case, test.cpp was compiled with this command:
/work/tools/gcc47/bin/g++  -I. -g -O3 -static-libstdc++ -static-libgcc 
-march=nativetest.cpp   -o test


[Bug target/50182] Performance degradation from gcc 4.1 (x86_64)

2011-10-24 Thread oleg at smolsky dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182

--- Comment #17 from oleg at smolsky dot net 2011-10-24 18:27:31 UTC ---
Created attachment 25595
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25595
test.cpp.144t.optimized

--- Comment #18 from oleg at smolsky dot net 2011-10-24 18:27:31 UTC ---
Created attachment 25596
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25596
test.s


[Bug c++/50858] New: [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981

2011-10-24 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50858

 Bug #: 50858
   Summary: [4.7 Regression] segfault at
../../gcc/libiberty/hashtab.c:981
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mar...@trippelsdorf.de


Segfault happened when building chromium.

 % cat test.ii
class String {
   typedef struct ImplicitConversionFromWTFStringToBoolDisallowedA* 
   (String::*UnspecifiedBoolTypeA);
   typedef struct ImplicitConversionFromWTFStringToBoolDisallowedB* 
   (String::*UnspecifiedBoolTypeB);
   operator UnspecifiedBoolTypeA() const;
   operator UnspecifiedBoolTypeB() const;
};
inline bool equalIgnoringCase(const String& a, const String& b) { }
inline bool equalPossiblyIgnoringCase(const String& a, 
  const String& b,
  bool ignoreCase) {
return ignoreCase ? equalIgnoringCase(a, b) : (a == b);

 % g++ test.ii
test.ii: In function ‘bool equalPossiblyIgnoringCase(const String&, const
String&, bool)’:
test.ii:9:57: internal compiler error: Segmentation fault
Please submit a full bug report,

 % gdb g++
GNU gdb (Gentoo 7.3.1 p1) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/bin/g++...(no debugging symbols found)...done.
(gdb) set follow-fork-mode child
(gdb) run test.ii
Starting program: /usr/bin/g++ test.ii
warning: no loadable sections found in added symbol-file system-supplied DSO at
0x77ffa000
process 17289 is executing new program:
/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.0/g++
[New process 17295]
process 17295 is executing new program:
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.0/cc1plus

Program received signal SIGSEGV, Segmentation fault.
[Switching to process 17295]
iterative_hash (k_in=, length=,
initval=) at ../../gcc/libiberty/hashtab.c:981
981 case 4 : a+=((hashval_t)k[3]<<24);
(gdb) bt
#0  iterative_hash (k_in=, length=,
initval=) at ../../gcc/libiberty/hashtab.c:981
#1  0x0093ca7b in build_offset_type (basetype=0x771c2348,
type=0x6e6f6c20676e6f6c) at ../../gcc/gcc/tree.c:7850
#2  0x0093cadb in build_offset_type (basetype=0x771c2348,
type=0x7706dd68) at ../../gcc/gcc/tree.c:7864
#3  0x00523085 in composite_pointer_type_r (t1=0x771c2930,
t2=0x771c2690, operation=CPO_CONVERSION, complain=)
at ../../gcc/gcc/cp/typeck.c:538
#4  0x00498b73 in add_builtin_candidate (candidates=0x7fffd1b8,
code=, code2=, fnname=0x77079cb8,
type1=, type2=, args=0x7fffd1c0,
argtypes=0x7fffd0e0, flags=3) at ../../gcc/gcc/cp/call.c:2587
#5  0x004990dc in add_builtin_candidates (candidates=0x7fffd1b8,
code=EQ_EXPR, code2=NOP_EXPR, fnname=0x77079cb8,
args=0x7fffd1c0, flags=3) at ../../gcc/gcc/cp/call.c:2790
#6  0x0049e441 in build_new_op_1 (code=EQ_EXPR, flags=3,
arg1=0x771b3f78, arg2=0x771b3fa0, arg3=0x0, overload=0x7fffd318,
complain=3) at ../../gcc/gcc/cp/call.c:4991
#7  0x0049eb6f in build_new_op (code=EQ_EXPR, flags=3,
arg1=0x771b3f78, arg2=0x771b3fa0, arg3=,
overload=, complain=3) at ../../gcc/gcc/cp/call.c:5256
#8  0x0051ff45 in build_x_binary_op (code=EQ_EXPR, arg1=0x771b3f78,
arg1_code=ERROR_MARK, arg2=0x771b3fa0, arg2_code=ERROR_MARK,
overload=, complain=3) at ../../gcc/gcc/cp/typeck.c:3540
#9  0x00508b2c in cp_parser_binary_expression (parser=0x771bf688,
cast_p=, no_toplevel_fold_p=0 '\000',
prec=PREC_NOT_OPERATOR, pidk=) at
../../gcc/gcc/cp/parser.c:7009
#10 0x00508e23 in cp_parser_assignment_expression
(parser=0x771bf688, cast_p=0 '\000', pidk=0x7fffd664)
at ../../gcc/gcc/cp/parser.c:7114
#11 0x0050ecac in cp_parser_expression (parser=0x771bf688,
cast_p=, pidk=0x7fffd664)
at ../../gcc/gcc/cp/parser.c:7260
#12 0x00503087 in cp_parser_primary_expression (parser=0x771bf688,
address_p=, cast_p=0 '\000', template_arg_p=0 '\000',
idk=0x7fffd664) at ../../gcc/gcc/cp/parser.c:3701
#13 0x005048a6 in cp_parser_postfix_expression (parser=0x771bf688,
address_p=0 '\000', cast_p=0 '\000', member_access_only_p=0 '\000',
pidk_return=0x0) at ../../gcc/gcc/cp/parser.c:5228
#14 0x005017c3 in cp_parser_unary_expression (parser=0x771bf688,
address_p=0 '\000', cast_p=0 '\000', pidk=0x0)
at ../../gcc/gcc/cp/parser.c:6224
#15 0x0050892b in 

[Bug target/50182] Performance degradation from gcc 4.1 (x86_64)

2011-10-24 Thread oleg at smolsky dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182

--- Comment #19 from oleg at smolsky dot net 2011-10-24 18:33:23 UTC ---
Also note that Bugzilla has quietly replaced an older attachment, 
test.cpp, with a new one without adding a comment...


[Bug c++/50858] [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981

2011-10-24 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50858

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||paolo.carlini at oracle dot
   ||com

--- Comment #1 from Markus Trippelsdorf  
2011-10-24 19:03:29 UTC ---
Probably caused by:

commit 71c209820f6749e12b27155ac827adf9944d3941
Author: paolo 
Date:   Fri Oct 14 14:43:03 2011 +

/cp
2011-10-14  Paolo Carlini  

PR c++/38174
* call.c (add_builtin_candidate): If two pointers have a composite
pointer type, generate a single candidate with that type.

/testsuite
2011-10-14  Paolo Carlini  

PR c++/38174
* g++.dg/overload/operator4.C: New.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179984
138bc75d-0d04-0410-961f-82ee72b054a4


[Bug target/50182] Performance degradation from gcc 4.1 (x86_64)

2011-10-24 Thread xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182

--- Comment #20 from davidxl  2011-10-24 19:33:18 
UTC ---
The test.cpp attached seems to be the same as the old version.

David


[Bug libstdc++/50196] [C++0x] std::thread not available under macos

2011-10-24 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50196

--- Comment #9 from Jonathan Wakely  2011-10-24 
19:33:32 UTC ---
I'm not sure if these failures are due to PR 50598:

FAIL: 30_threads/thread/native_handle/typesizes.cc execution test
FAIL: ext/mt_allocator/deallocate_global_thread-1.cc execution test
FAIL: ext/mt_allocator/deallocate_global_thread-3.cc execution test

The first one might be due to the dg-options for *-*-darwin not including
-pthread (which I believe should be valid on both x86 and ppc darwin)


[Bug target/50182] Performance degradation from gcc 4.1 (x86_64)

2011-10-24 Thread oleg at smolsky dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182

--- Comment #21 from oleg at smolsky dot net 2011-10-24 19:48:57 UTC ---
OK, just in case, here is my current test.


[Bug target/50182] Performance degradation from gcc 4.1 (x86_64)

2011-10-24 Thread xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182

--- Comment #22 from davidxl  2011-10-24 19:58:23 
UTC ---
(In reply to comment #21)
> OK, just in case, here is my current test.

Preprocessed test case? I saw the main assembly difference that can explain the
performance diff, but want to make sure it is not due to your new source change
(I saw some print statement addeded).

David


[Bug middle-end/50823] [4.7 Regression] ICE in inline_small_functions, at ipa-inline.c:1407

2011-10-24 Thread d.g.gorbachev at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50823

--- Comment #3 from Dmitry Gorbachev  
2011-10-24 20:10:12 UTC ---
Created attachment 25598
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25598
Another testcase

Compile it with `gcc -O3 -flto -nostdlib -r foobar.c baz.c'.


[Bug c++/50858] [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50858

--- Comment #2 from Paolo Carlini  2011-10-24 
20:57:27 UTC ---
What do you mean by 'probably'? Did you bisect this? Anyway, if it's really my
patch, please confirm, no problem reverting it and reopening, didn't fix a
regression, can wait.


[Bug target/50182] Performance degradation from gcc 4.1 (x86_64)

2011-10-24 Thread oleg at smolsky dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182

--- Comment #23 from oleg at smolsky dot net 2011-10-24 21:11:21 UTC ---
Here is the source preprocessed for gcc47. The test exhibits the 
slowdown mentioned in comment 11.


[Bug c++/50858] [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50858

Paolo Carlini  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #3 from Paolo Carlini  2011-10-24 
21:11:39 UTC ---
Jason, if something is going wrong with the composite pointer type thing, I
guess I would just revert it for now, I don't know how much progress I can make
debugging this one and I hate having regression open around. Is that ok with
you?


[Bug c++/50858] [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981

2011-10-24 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50858

--- Comment #4 from Markus Trippelsdorf  
2011-10-24 21:23:35 UTC ---
(In reply to comment #2)
> What do you mean by 'probably'? Did you bisect this?

By probably I mean looking at the backtrace and running 
git-blame starting from the top entry. Then one finally arrives at:
/../gcc/gcc/cp/call.c:2587 which points to your commit:

71c20982 (paolo2011-10-14 14:43:03 + 2587)tree cptype =
composite_pointer_type (type1, type2,

I did revert the commit later and this "solves" the issue.


[Bug c++/50858] [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50858

--- Comment #5 from Paolo Carlini  2011-10-24 
21:31:39 UTC ---
I see, at the moment I don't have my machines at hand, sorry for not noticing.
Anyway, let me double check isn't something trivial and then we'll resolve  the
issue.


[Bug target/50182] Performance degradation from gcc 4.1 (x86_64)

2011-10-24 Thread xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182

--- Comment #24 from davidxl  2011-10-24 23:00:22 
UTC ---
(In reply to comment #23)
> Here is the source preprocessed for gcc47. The test exhibits the 
> slowdown mentioned in comment 11.


The problem can be reproduced with a simplified test case -- basically
depending on how the result value from the inner loop is used in the outer loop
(related to casting), the inner loop code is quite different - in the slow
case, there are two redundant sign extension and a move instructions generated.

# the fast version
gcc -O3 -DFAST_VER bug.cpp

./a.out 
rv=4282167296

test description   absolute   operations   ratio with
number time   per second   test0

 0 "int8_t constant add"   1.05 sec   1523.81 M 1.00

Total absolute time for int8_t constant folding: 1.05 sec

# the slow version:

gcc -O3 bug.cpp
./a.out 
rv=4282167296

test description   absolute   operations   ratio with
number time   per second   test0

 0 "int8_t constant add"   1.57 sec   1019.11 M 1.00

Total absolute time for int8_t constant folding: 1.57 sec


# however, when disabling inlining of check_shifted_sum_1 in the slow case, the
runtime is recovered:

gcc -O3 -DNOINLINE bug.cpp

./a.out 
rv=4282167296

test description   absolute   operations   ratio with
number time   per second   test0

 0 "int8_t constant add"   1.05 sec   1523.81 M 1.00

Total absolute time for int8_t constant folding: 1.05 sec



The inner loop body in faster case:

.L60:
movzbl0(%rbp,%rcx), %r9d
addq$1, %rcx
cmpl%ecx, %ebx
leal10(%r8,%r9), %r8d
# SUCC: 4 [91.0%]  (dfs_back,can_fallthru) 5 [9.0%] 
(fallthru,can_fallthru,loop_exit)
jg.L60

while for the slow case:

.L60:
movzbl(%r12,%rcx), %eax
movsbl%r8b, %r8d
addq$1, %rcx
leal10(%rax), %r9d
movsbl%r9b, %r9d
addl%r8d, %r9d
cmpl%ecx, %ebp
movl%r9d, %r8d
# SUCC: 4 [91.0%]  (dfs_back,can_fallthru) 5 [9.0%] 
(fallthru,can_fallthru,loop_exit)
jg.L60


The relevant source change:

#ifdef NOINLINE
#define INL __attribute__((noinline))
#else
#define INL inline
#endif

template 
INL void check_shifted_sum_1(T2 result) {
 T temp = (T)SIZE * Shifter::do_shift((T)init_value);
 if (!tolerance_equal((T&)result,temp))
  printf("test %i failed\n", current_test);
}

#ifdef FAST_VER
#define TYPE u_int32_t
#else
#define TYPE int8_t
#endif


template 
__attribute__((noinline)) u_int32_t test_constant(T* first, int count, const
char *label)
{
int i;
u_int32_t rv = 0;

start_timer();

for (i = 0; i < iterations; ++i) {
T result = 0;
for (int n = 0; n < count; ++n) {
result += Shifter::do_shift( first[n] );
}
rv += result;
check_shifted_sum_1(result);
}

record_result( timer(), label );
return rv;
}


[Bug target/50182] Performance degradation from gcc 4.1 (x86_64)

2011-10-24 Thread xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182

--- Comment #25 from davidxl  2011-10-24 23:02:14 
UTC ---
Created attachment 25600
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25600
test case for 47



Note that with gcc46, the result is even slower -- it has the RAT stall problem
which is fixed in 47.


David


[Bug target/50751] SH Target: Displacement addressing does not work for QImode and HImode

2011-10-24 Thread kkojima at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50751

--- Comment #5 from Kazumoto Kojima  2011-10-24 
23:05:08 UTC ---
(In reply to comment #4)
It seems that clobbering R0 in that expander is simply papering
over the real problem.  Although the reload issue beyonds me,
.ira dump file about that impossible insn which doesn't satisfy
the "z" constraint would be a starting point.


[Bug c++/50858] [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50858

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-24
 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot
   |gnu.org |com
   Target Milestone|--- |4.7.0
 Ever Confirmed|0   |1

--- Comment #6 from Paolo Carlini  2011-10-24 
23:22:41 UTC ---
On it.


[Bug libstdc++/49894] [C++0x] Uniform initialization in constructor

2011-10-24 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49894

--- Comment #10 from Jonathan Wakely  2011-10-24 
23:26:29 UTC ---
Author: redi
Date: Mon Oct 24 23:26:25 2011
New Revision: 180411

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180411
Log:
PR libstdc++/49894
* include/std/mutex (__mutex_base,__recursive_mutex_base): Define new
base classes to manage construction/destruction of native mutexes,
using NSDMI when INIT macros are defined.
(mutex,recursive_mutex,timed_mutex,recursive_timed_mutex): Derive from
new base classes.
* include/std/condition_variable (condition_variable): Use NSDMI when
INIT macro is defined. Use noexcept.
* src/condition_variable.cc (condition_variable): Explicitly-default
constructor/destructor when using NSDMI. Use noexcept.
(condition_variable_any): Likewise.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/condition_variable
trunk/libstdc++-v3/include/std/mutex
trunk/libstdc++-v3/src/condition_variable.cc


[Bug libstdc++/49894] [C++0x] Uniform initialization in constructor

2011-10-24 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49894

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #11 from Jonathan Wakely  2011-10-24 
23:29:38 UTC ---
Fixed for 4.7 - mutexes and condition_variables use NSDMI to initialize the
native types when possible


[Bug c++/50859] New: ICE when creating integral constant from real value in a template

2011-10-24 Thread bitbucket at mailinator dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50859

 Bug #: 50859
   Summary: ICE when creating integral constant from real value in
a template
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: bitbuc...@mailinator.com


$ curl 'http://169.254.169.254/latest/meta-data/ami-id' && echo
ami-21f53948
$ cat /etc/issue
Ubuntu 11.10 \n \l

$ uname -a
Linux domU-12-31-39-12-AC-DE 3.0.0-12-virtual #20-Ubuntu SMP Fri Oct 7 18:19:02
UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
$ g++ --version
g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
Copyright (C) 2011 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.

$ cat ice.cc 
template 
void f() {
  const int INTEGRAL_CONSTANT = 1.0;
}

$ g++ ice.cc
ice.cc: In function ‘void f()’:
ice.cc:3:33: internal compiler error: in fold_convert_const_int_from_real, at
fold-const.c:1562
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Preprocessed source stored into /tmp/ccRBRVx3.out file, please attach this to
your bugreport.
$ cat /tmp/ccRBRVx3.out
// /usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1plus -quiet -imultilib . -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE ice.cc -quiet -dumpbase ice.cc -mtune=generic
-march=x86-64 -auxbase ice -fstack-protector -o - -frandom-seed=0
# 1 "ice.cc"
# 1 ""
# 1 ""
# 1 "ice.cc"
template 
void f() {
  const int INTEGRAL_CONSTANT = 1.0;
}
$

This error does not appear in g++ 4.4.1


[Bug c++/50858] [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50858

Paolo Carlini  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 CC|paolo.carlini at oracle dot |
   |com |

--- Comment #7 from Paolo Carlini  2011-10-24 
23:48:00 UTC ---
Note however that this an ice on *invalid*, ie, if I revert my patch for
PR38174 the testcase is just smoothly rejected because the overload is
ambiguous, is not accepted. In other terms, if chromium at the moment doesn't
build for you, it will still not build after this PR is fixed.


[Bug c++/50859] ICE when creating integral constant from real value in a template

2011-10-24 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50859

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-24
  Known to work||4.7.0
 Ever Confirmed|0   |1

--- Comment #1 from Jonathan Wakely  2011-10-24 
23:49:23 UTC ---
seems to be fixed on the trunk already


[Bug c++/49855] [4.6/4.7 Regression] internal compiler error: in fold_convert_const_int_from_real

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49855

Paolo Carlini  changed:

   What|Removed |Added

 CC||bitbucket at mailinator dot
   ||com

--- Comment #8 from Paolo Carlini  2011-10-24 
23:54:46 UTC ---
*** Bug 50859 has been marked as a duplicate of this bug. ***


[Bug c++/50859] ICE when creating integral constant from real value in a template

2011-10-24 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50859

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE

--- Comment #2 from Paolo Carlini  2011-10-24 
23:54:46 UTC ---
Duplicate, already fixed for 4.6.2.

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


[Bug java/50860] New: Unexpected NullPointerException when create simple class

2011-10-24 Thread lsching17 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50860

 Bug #: 50860
   Summary: Unexpected NullPointerException when create simple
class
Classification: Unclassified
   Product: gcc
   Version: 4.5.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: java
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: lschin...@gmail.com


Created attachment 25601
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25601
test case to reproduce the problem

I am currently porting a simple network server from sun jre 6 to gcj

The server do the following:
a. listen to socket 2   (net_server_main.java)
b. submit a task to threadpool to handle connection
(net_server_connection_class.java)

However, when i try to resolve the string of current date, null pointer
exception is raised (net_server_connection_class.java, line 23)

The related line is simple and i suspect that it is related to gcj bug

Step to reproduce:
1. run script "compile_and_run.sh"
2. use a web browser to browse "http://localhost:2"; (in my PC, firefox 7.0)

help message will be display at stdout/stderr of step 1.


[Bug java/50860] Unexpected NullPointerException when create simple class

2011-10-24 Thread lsching17 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50860

--- Comment #1 from lsching17 at gmail dot com 2011-10-25 00:12:29 UTC ---
Created attachment 25602
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25602
gcj -v


[Bug java/50860] Unexpected NullPointerException when create simple class

2011-10-24 Thread lsching17 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50860

lsching17 at gmail dot com changed:

   What|Removed |Added

  Attachment #25602|0   |1
is obsolete||

--- Comment #2 from lsching17 at gmail dot com 2011-10-25 00:13:58 UTC ---
Created attachment 25603
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25603
information of command "gcj -v"


[Bug java/50860] Unexpected NullPointerException when create simple class

2011-10-24 Thread lsching17 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50860

--- Comment #3 from lsching17 at gmail dot com 2011-10-25 00:16:13 UTC ---
Created attachment 25604
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25604
compile linux x64 executable (by gcj 4.5.2)

--main=net_server_main -pipe -O2


  1   2   >