[Bug middle-end/45230] gcc.c-torture/execute/strncmp-1.c ICEs with -fgraphite-identity

2010-08-26 Thread t66667 at gmail dot com


--- Comment #4 from t7 at gmail dot com  2010-08-26 06:04 ---
*** Bug 45406 has been marked as a duplicate of this bug. ***


-- 

t7 at gmail dot com changed:

   What|Removed |Added

 CC||t7 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45230



[Bug middle-end/45406] internal compiler error: in rename_uses, at sese.c:534

2010-08-26 Thread t66667 at gmail dot com


--- Comment #3 from t7 at gmail dot com  2010-08-26 06:04 ---


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


-- 

t7 at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45406



[Bug c++/44991] [4.4/4.5/4.6 Regression] default argument with '' cause compilation error

2010-08-26 Thread jason at gcc dot gnu dot org


-- 

jason at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-07-19 15:38:28 |2010-08-26 06:09:53
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44991



[Bug c++/45409] ICE, g++ 4.4.x, -fschedule-insns, unable to find a register to spill in class '*REG'

2010-08-26 Thread jakub at gcc dot gnu dot org


--- Comment #5 from jakub at gcc dot gnu dot org  2010-08-26 07:14 ---
It isn't in terrible shape on many targets, it is only on targets with very
small amount of registers where -fschedule-insns didn't in 4.4 and earlier
(since forever) work reliably and wasn't enabled by default either for those
targets.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45409



[Bug middle-end/45410] constant not optimized / propagated

2010-08-26 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2010-08-26 07:33 ---
That's not the main problem here.  The problem is that this is an aggregate and
we SRA only automatic vars, not global vars.  And it isn't constant either
(neither declared, nor actually, so can't be detected as constant).  Special
handling of main would just add info that it is called only once in the
lifetime of the program.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45410



[Bug c++/45411] New: Please add -Wno-unused-variable and friends compiler warning options

2010-08-26 Thread noloader at gmail dot com
Hello,

-Wno-unused-variable and friends such as -Wno-unused-parameter would be
welcome additions for folks who like to use -Wall and -Wextra.

Reasons it would be a good idea to include the -no forms:
(1) its easy to remember
(2) its easy to use
(3) when using -Wall and -Wextra, the noise created by the various unused
warnings drowns out other issues which should get attention
(4) there's nothing intuitive about the 'unused' attribute so one might have to
actually RTFM
(5) I'm lazy and don't want to locate the applicable man page for the proper
usage of the 'unused' attribute
(6) the 'unused' attribute requires modifications to source files at all
applicable declarations (and non-use)
(7) makefile friendly solutions, such as -Wno-unused-parameter, means one
only has to change one file
(8) I'm lazy and don't want to change every declaration with an 'unused'
attribute
(9) no easy way to control 'unused warning' spew is one of the biggest
complaints on the crypto++ mailing list when building for *nix


-- 
   Summary: Please add -Wno-unused-variable and friends compiler
warning options
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: noloader at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45411



[Bug tree-optimization/45412] New: [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer

2010-08-26 Thread zsojka at seznam dot cz
Command line:
$ g++ -O2 -fipa-cp-clone -ftracer testcase.C

Valgrind output:
$ valgrind -q --trace-children=yes
/mnt/svn/gcc-trunk/binary-163468-lto-fortran-checking-yes-rtl-df/bin/g++ -O2
-fipa-cp-clone -ftracer testcase.C
==31083== Invalid read of size 8
==31083==at 0x112BDF0: search_line_sse2 (lex.c:384)
==31083==by 0x112BFD9: _cpp_clean_line (lex.c:649)
==31083==by 0x112C9D7: _cpp_get_fresh_line (lex.c:1862)
==31083==by 0x112E161: _cpp_lex_direct (lex.c:1927)
==31083==by 0x112EF56: _cpp_lex_token (lex.c:1801)
==31083==by 0x1131697: cpp_get_token (macro.c:1240)
==31083==by 0x113194F: cpp_get_token_with_location (macro.c:1352)
==31083==by 0x687E5C: c_lex_with_flags (c-lex.c:302)
==31083==by 0x59ADAF: cp_lexer_get_preprocessor_token (parser.c:525)
==31083==by 0x5C19BA: c_parse_file (parser.c:425)
==31083==by 0x68D4EA: c_common_parse_file (c-opts.c:1206)
==31083==by 0x9E7518: toplev_main (toplev.c:971)
==31083==  Address 0x71085b8 is 216 bytes inside a block of size 217 alloc'd
==31083==at 0x4C261DF: realloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==31083==by 0x115545C: xrealloc (xmalloc.c:179)
==31083==by 0x1120BAF: _cpp_convert_input (charset.c:1734)
==31083==by 0x1129542: read_file (files.c:648)
==31083==by 0x1129F6A: _cpp_stack_file (files.c:723)
==31083==by 0x112B850: cpp_read_main_file (init.c:570)
==31083==by 0x68CB9A: c_common_post_options (c-opts.c:1124)
==31083==by 0x9E6A14: toplev_main (toplev.c:1743)
==31083==by 0x6589BBC: (below main) (in /lib64/libc-2.11.2.so)
==31083== 
==31083== Invalid read of size 8
==31083==at 0x112BDE3: search_line_sse2 (lex.c:372)
==31083==by 0x112BFD9: _cpp_clean_line (lex.c:649)
==31083==by 0x112C9D7: _cpp_get_fresh_line (lex.c:1862)
==31083==by 0x112E161: _cpp_lex_direct (lex.c:1927)
==31083==by 0x112EF56: _cpp_lex_token (lex.c:1801)
==31083==by 0x1131697: cpp_get_token (macro.c:1240)
==31083==by 0x113194F: cpp_get_token_with_location (macro.c:1352)
==31083==by 0x687E5C: c_lex_with_flags (c-lex.c:302)
==31083==by 0x59ADAF: cp_lexer_get_preprocessor_token (parser.c:525)
==31083==by 0x5C19BA: c_parse_file (parser.c:425)
==31083==by 0x68D4EA: c_common_parse_file (c-opts.c:1206)
==31083==by 0x9E7518: toplev_main (toplev.c:971)
==31083==  Address 0x71085b8 is 216 bytes inside a block of size 217 alloc'd
==31083==at 0x4C261DF: realloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==31083==by 0x115545C: xrealloc (xmalloc.c:179)
==31083==by 0x1120BAF: _cpp_convert_input (charset.c:1734)
==31083==by 0x1129542: read_file (files.c:648)
==31083==by 0x1129F6A: _cpp_stack_file (files.c:723)
==31083==by 0x112B850: cpp_read_main_file (init.c:570)
==31083==by 0x68CB9A: c_common_post_options (c-opts.c:1124)
==31083==by 0x9E6A14: toplev_main (toplev.c:1743)
==31083==by 0x6589BBC: (below main) (in /lib64/libc-2.11.2.so)
==31083== 
==31083== Invalid read of size 8
==31083==at 0xA2CDE5: update_ssa (tree-flow-inline.h:479)
==31083==by 0x8F95D7: execute_function_todo (passes.c:1206)
==31083==by 0x8F9BEE: execute_todo (passes.c:1283)
==31083==by 0x8FC2B9: execute_one_pass (passes.c:1591)
==31083==by 0x8FC4E4: execute_pass_list (passes.c:1623)
==31083==by 0x8FC4F6: execute_pass_list (passes.c:1624)
==31083==by 0xA3EE65: tree_rest_of_compilation (tree-optimize.c:452)
==31083==by 0xBFB595: cgraph_expand_function (cgraphunit.c:1469)
==31083==by 0xBFDF99: cgraph_optimize (cgraphunit.c:1548)
==31083==by 0xBFE4E9: cgraph_finalize_compilation_unit (cgraphunit.c:1012)
==31083==by 0x58BD9C: cp_write_global_declarations (decl2.c:3924)
==31083==by 0x9E7554: toplev_main (toplev.c:983)
==31083==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==31083== 
testcase.C: In member function 'virtual int S::vm()':
testcase.C:11: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.

Tested revisions:
r163468 - crash
r162940 - crash
r161659 - OK


-- 
   Summary: [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-
inline.h:479) with -O2 -fipa-cp-clone -ftracer
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412



[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer

2010-08-26 Thread zsojka at seznam dot cz


--- Comment #1 from zsojka at seznam dot cz  2010-08-26 09:04 ---
Created an attachment (id=21569)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21569action=view)
reduced testcase

$ g++ -O2 -fipa-cp-clone -ftracer pr45412.C


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412



[Bug c++/45411] Please add -Wno-unused-variable and friends compiler warning options

2010-08-26 Thread noloader at gmail dot com


--- Comment #1 from noloader at gmail dot com  2010-08-26 09:09 ---
Though (5) and (8) are specific to me, there's nothing really special about me
- there's probably lots of lazy programmers who would also like the warning
options.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45411



[Bug c++/45411] Please add -Wno-unused-variable and friends compiler warning options

2010-08-26 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2010-08-26 09:23 ---
There of course are
-Wno-unused-{function,label,parameter,value,variable,but-set-{parameter,variable}}
options.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45411



[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer

2010-08-26 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2010-08-26 09:42 ---
Confirmed.

The tracer seriously messes up virtual operands.  I'm not sure the copy
tables work like the author thought they would.

After duplicating we have

virtual int S::vm() (struct S * const this)
{
  int state;
  int D.2129;
  int retval.0;

bb 2:
  # .MEM_8 = VDEF .MEM_7(D)
  retval.0_1 = foo (state);
  switch (retval.0_1) default: L3, case 0: L0, case 1: L1

L0:
  # .MEM_9 = VDEF .MEM_8
  bar ();

bb 7:
  # .MEM_14 = PHI .MEM_9(3)
  if (this_3(D) != 0B)
goto bb 8;
  else
goto bb 6 (L3);

bb 8:
  # .MEM_15 = VDEF .MEM_5
  S::~S (this_3(D));
  # .MEM_16 = VDEF .MEM_12
  operator delete (this_3(D));

bb 9:
  # .MEM_17 = PHI .MEM_13(8)
  # VUSE .MEM_10
  D.2129_18 = state;
  return D.2129_4;

  # .MEM_5 = PHI .MEM_8(2)
L1:
  if (this_3(D) != 0B)
goto bb 5;
  else
goto bb 6 (L3);

bb 5:
  # .MEM_12 = VDEF .MEM_5
  S::~S (this_3(D));
  # .MEM_13 = VDEF .MEM_12
  operator delete (this_3(D));

  # .MEM_10 = PHI .MEM_8(2), .MEM_5(4), .MEM_13(5), .MEM_5(7)
L3:
  # VUSE .MEM_10
  D.2129_4 = state;
  return D.2129_4;

}


see how virtual SSA form is messed up (and no symbol is marked for
renaming).


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-08-26 09:42:55
   date||
   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412



[Bug middle-end/45410] constant not optimized / propagated

2010-08-26 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2010-08-26 09:46 ---
Well, you need flow-sensitive analysis to figure out that when visiting
ss.j += 88; you can assume that ss.j is still 2.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45410



[Bug middle-end/45410] constant not optimized / propagated

2010-08-26 Thread jakub at gcc dot gnu dot org


--- Comment #4 from jakub at gcc dot gnu dot org  2010-08-26 09:59 ---
Sure, one that would also be able to assume that main is called just once.
Anyway, even to optimize ss.i into 77 you'd need a way to mark fields in global
aggregates as const if they aren't ever modified...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45410



[Bug c++/45411] Please add -Wno-unused-variable and friends compiler warning options

2010-08-26 Thread redi at gcc dot gnu dot org


--- Comment #3 from redi at gcc dot gnu dot org  2010-08-26 10:14 ---
You didn't say which version of GCC you're using, but it doesn't really matter
because these options have been in place for many years.

(In reply to comment #0)
 (5) I'm lazy and don't want to locate the applicable man page

Here it is:
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

 (9) no easy way to control 'unused warning' spew is one of the biggest
 complaints on the crypto++ mailing list when building for *nix

This gives neither unused variable not unused parameter warnings:
void f(int) {
  int j = 0;
  (void)j;
}
But if that's not easy enough, just use relevant -Wno-... option.


-- 

redi at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45411



[Bug lto/44812] m32 lto produces non-relocatable subtraction expression errors

2010-08-26 Thread howarth at nitro dot med dot uc dot edu


--- Comment #17 from howarth at nitro dot med dot uc dot edu  2010-08-26 
10:18 ---
Testresults with proposed patch at
http://gcc.gnu.org/ml/gcc-testresults/2010-08/msg02586.html.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44812



[Bug testsuite/45413] New: gcc.target/i386/combine-mul.c fails on PIC targets

2010-08-26 Thread howarth at nitro dot med dot uc dot edu
The scan-assembler-not 12345 test in gcc.target/i386/combine-mul.c fails on
x86_64-apple-darwin10 due to that target defaulting to -fPIC. Adding -fno-PIC
eliminates the failure. This testcase needs...

Index: gcc.target/i386/combine-mul.c
===
--- gcc.target/i386/combine-mul.c   (revision 163561)
+++ gcc.target/i386/combine-mul.c   (working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options -O2 } */
+/* { dg-require-effective-target nonpic } */
 /* { dg-final { scan-assembler-not 12345 } } */

 static inline unsigned int myrnd (void)


-- 
   Summary: gcc.target/i386/combine-mul.c fails on PIC targets
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: howarth at nitro dot med dot uc dot edu
 GCC build triplet: x86_64-apple-darwin10
  GCC host triplet: x86_64-apple-darwin10
GCC target triplet: x86_64-apple-darwin10


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45413



[Bug c/45414] New: _mm_prefetch parameter is char const * in ICC

2010-08-26 Thread kretz at kde dot org
Hi,

I agree that const void * is the better parameter for _mm_prefetch, but it
leads to incompatible code. ICC defines _mm_prefetch as:
void _mm_prefetch(char const *, int)

and MSVC documents it as:
void _mm_prefetch(char * p , int i )

(which is even worse). I would expect the GCC header to use const char * too
for the sake of portable code.


-- 
   Summary: _mm_prefetch parameter is char const * in ICC
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kretz at kde dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45414



[Bug testsuite/45413] gcc.target/i386/combine-mul.c fails on PIC targets

2010-08-26 Thread bernds at gcc dot gnu dot org


--- Comment #1 from bernds at gcc dot gnu dot org  2010-08-26 10:57 ---
Ok, I could apply that, but why is it failing?  What assembly output is being
produced for it?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45413



[Bug testsuite/45413] gcc.target/i386/combine-mul.c fails on PIC targets

2010-08-26 Thread howarth at nitro dot med dot uc dot edu


--- Comment #2 from howarth at nitro dot med dot uc dot edu  2010-08-26 
11:13 ---
Created an attachment (id=21570)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21570action=view)
assembly file for gcc.target/i386/combine-mul.c on x86_64-apple-darwin10


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45413



[Bug middle-end/45415] New: [4.6 Regression] ICE in partition_view_bitmap, at tree-ssa-live.c:334

2010-08-26 Thread rguenth at gcc dot gnu dot org
gcc.c-torture/execute/960416-1.c fails this way with -O1
-fno-tree-dominator-opts, 4.5 is fine.

 /abuild/rguenther/trunk-g/gcc/xgcc -B/abuild/rguenther/trunk-g/gcc/ 
 /space/rguenther/src/svn/trunk/gcc/testsuite/gcc.c-torture/execute/960416-1.c 
 -w -O1 -lm -fno-tree-dominator-opts -o 
 /abuild/rguenther/trunk-g/gcc/testsuite/gcc/960416-1.x1 
/space/rguenther/src/svn/trunk/gcc/testsuite/gcc.c-torture/execute/960416-1.c:
In function 'f_le':
/space/rguenther/src/svn/trunk/gcc/testsuite/gcc.c-torture/execute/960416-1.c:48:1:
internal compiler error: in partition_view_bitmap, at tree-ssa-live.c:334
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.


-- 
   Summary: [4.6 Regression] ICE in partition_view_bitmap, at tree-
ssa-live.c:334
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45415



[Bug middle-end/45415] [4.6 Regression] ICE in partition_view_bitmap, at tree-ssa-live.c:334

2010-08-26 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||matz at gcc dot gnu dot org
  Known to work||4.5.1
   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45415



[Bug c/45416] New: Code size regression between 4.6(4.5) and 4.4

2010-08-26 Thread bmei at broadcom dot com
This is a performance/size regression between 4.6 (4.5) and 4.4. 

The C code:
int foo(long long a)
{
   if (a  (long long) 0x400)
  return 1;
   return 0;
}

Assemble code generated by 4.6 trunk:
foo:
.LFB0:
.cfi_startproc
pushq   %rbp
.cfi_def_cfa_offset 16
movq%rsp, %rbp
.cfi_offset 6, -16
.cfi_def_cfa_register 6
movq%rdi, -8(%rbp)
movq-8(%rbp), %rax
andl$1024, %eax
testq   %rax, %rax
je  .L2
movl$1, %eax
jmp .L3
.L2:
movl$0, %eax
.L3:
popq%rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc

Assemble code generated  by 4.4.0:
foo:
.LFB0:
.cfi_startproc
shrq$10, %rdi
movl%edi, %eax
andl$1, %eax
ret
.cfi_endproc

After tree optimizations, both compilers produce different
but essentially same forms. RTL expander and later passes 
then go on to do different optimizations and generate very
different code.


-- 
   Summary: Code size regression between 4.6(4.5) and 4.4
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bmei at broadcom dot com
  GCC host triplet: x86_64-unknown-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416



[Bug c/45416] Code size regression between 4.6(4.5) and 4.4

2010-08-26 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2010-08-26 12:43 ---
It works for me.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416



[Bug c/45416] Code size regression between 4.6(4.5) and 4.4

2010-08-26 Thread bmei at broadcom dot com


--- Comment #2 from bmei at broadcom dot com  2010-08-26 12:47 ---
Sorry, I first observed this on our target.  Then I tried to reproduce on x86,
but I forgot to turn on optimization flags. It does work for x86. Please delete
this report. I will figure out what happen with my target. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416



[Bug c/45416] Code size regression between 4.6(4.5) and 4.4

2010-08-26 Thread bmei at broadcom dot com


--- Comment #3 from bmei at broadcom dot com  2010-08-26 12:55 ---
I found I can reproduce the bug with ARM

ARM trunk -Os:
foo:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
mov r2, #1024
mov r3, #0
and r2, r2, r0
and r3, r3, r1
orrsr1, r2, r3
moveq   r0, #0
movne   r0, #1
mov pc, lr
.size   foo, .-foo
Arm 4.40 -Os:

foo:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
mov r0, r0, lsr #10
and r0, r0, #1
bx  lr


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416



[Bug fortran/30677] Intrinsics arguments evaluated multiple times

2010-08-26 Thread fxcoudert at gcc dot gnu dot org


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|fxcoudert at gcc dot gnu dot|unassigned at gcc dot gnu
   |org |dot org
 Status|ASSIGNED|NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30677



[Bug fortran/45417] New: DEALLOCATE: No error when deallocating a target

2010-08-26 Thread burnus at gcc dot gnu dot org
See thread starting at
http://j3-fortran.org/pipermail/j3/2010-August/003747.html

The first example is valid (state == 0), the second valid (state /= 0), and the
third one is invalid.

gfortran produces, http://j3-fortran.org/pipermail/j3/2010-August/003753.html,
0 crash crash.

Expected: The second example produces state /= 0.


Variant (works, should be state == 0):
  http://j3-fortran.org/pipermail/j3/2010-August/003754.html

The problem is that our array descriptor does not save whether a variable has
been allocated or just associated with a named target. For the TR descriptor,
mentioned in the last link, cf.
http://j3-fortran.org/pipermail/interop-tr/2010-August/000163.html


-- 
   Summary: DEALLOCATE: No error when deallocating a target
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
 BugsThisDependsOn: 37577


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45417



[Bug c++/45418] New: [C++0x] can't initialize array of non-trivial type with brace-init

2010-08-26 Thread marc dot glisse at normalesup dot org
Hello,

this may just not be implemented yet, but in case it was missed:

struct A1 {
};
struct A2 {
A2(){}
};

template class T struct B {
T tab[1];
B(T const t):tab({t}) {} // here
};

int main(){
int i=2;
Bint b{i};
A1 a1;
BA1 e1{a1};
A2 a2;
A2 c[1]{{a2}};
BA2 e2{a2}; // fails
}

complains about a bad array initializer, whereas with a trivial type A1 or a
builtin int, it works fine.


-- 
   Summary: [C++0x] can't initialize array of non-trivial type with
brace-init
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: marc dot glisse at normalesup dot org
  GCC host triplet: x86_64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45418



[Bug c/45416] Code size regression between 4.6(4.5) and 4.4 for ARM

2010-08-26 Thread mikpe at it dot uu dot se


--- Comment #4 from mikpe at it dot uu dot se  2010-08-26 14:01 ---
(In reply to comment #3)
 I found I can reproduce the bug with ARM

I see this too on armv5tel-linux-gnueabi.  gcc-4.4.4 -Os generates 3
instructions for the body of foo(), 4.5.1 and 4.6.0 generate 8 instructions.


-- 

mikpe at it dot uu dot se changed:

   What|Removed |Added

 CC||mikpe at it dot uu dot se


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416



[Bug tree-optimization/45412] [4.6 Regression] ICE: SIGSEGV in update_ssa (tree-flow-inline.h:479) with -O2 -fipa-cp-clone -ftracer

2010-08-26 Thread hjl dot tools at gmail dot com


--- Comment #3 from hjl dot tools at gmail dot com  2010-08-26 14:16 ---
It is caused by revision 162842:

http://gcc.gnu.org/ml/gcc-cvs/2010-08/msg00053.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45412



[Bug middle-end/45415] [4.6 Regression] ICE in partition_view_bitmap, at tree-ssa-live.c:334

2010-08-26 Thread hjl dot tools at gmail dot com


--- Comment #1 from hjl dot tools at gmail dot com  2010-08-26 14:19 ---
It is caused by revision 162413:

http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg00767.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||jamborm at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-08-26 14:19:59
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45415



[Bug tree-optimization/45255] [4.6 regression] internal compiler error: verify_stmts failed with -fwhopr

2010-08-26 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2010-08-26 14:21 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45255



[Bug tree-optimization/45255] [4.6 regression] internal compiler error: verify_stmts failed with -fwhopr

2010-08-26 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2010-08-26 14:21 ---
Subject: Bug 45255

Author: rguenth
Date: Thu Aug 26 14:20:45 2010
New Revision: 163565

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163565
Log:
2010-08-26  Richard Guenther  rguent...@suse.de

PR tree-optimization/45255
* tree.c (decl_address_invariant_p): DECL_DLLIMPORT_P
statics and externals are also invariant.

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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45255



[Bug middle-end/45415] [4.6 Regression] ICE in partition_view_bitmap, at tree-ssa-live.c:334

2010-08-26 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2010-08-26 14:21 ---
I'd say it merely exposed it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45415



[Bug c++/45411] Please add -Wno-unused-variable and friends compiler warning options

2010-08-26 Thread noloader at gmail dot com


--- Comment #4 from noloader at gmail dot com  2010-08-26 14:54 ---
 You didn't say which version of GCC you're using, but it doesn't really matter
 because these options have been in place for many years.
Moot point indeed!  But for completeness
$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
$  uname -a
Linux studio 2.6.32-24-generic #41-Ubuntu SMP Thu Aug 19 01:38:40 UTC 2010
x86_64 GNU/Linux

 (In reply to comment #0)
 (5) I'm lazy and don't want to locate the applicable man page

 Here it is:
 http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Interesting. I was going to cite the same page.

Searching for -Wno-unused-parameter on the page returns 0 results. Under
-Wunused-parameter, the page states, Warn whenever a function parameter is
unused aside from its declaration. To suppress this warning use the `unused'
attribute (see Variable Attributes). (But no mention of
-Wno-unused-parameter).

Since I feel like a total ass, perhaps someone can close this feature request.

JW


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45411



[Bug c++/45411] Please add -Wno-unused-variable and friends compiler warning options

2010-08-26 Thread redi at gcc dot gnu dot org


--- Comment #5 from redi at gcc dot gnu dot org  2010-08-26 15:09 ---
(In reply to comment #4)
 
  (In reply to comment #0)
  (5) I'm lazy and don't want to locate the applicable man page
 
  Here it is:
  http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
 Interesting. I was going to cite the same page.
 
 Searching for -Wno-unused-parameter on the page returns 0 results. Under
 -Wunused-parameter, the page states, Warn whenever a function parameter is
 unused aside from its declaration. To suppress this warning use the `unused'
 attribute (see Variable Attributes). (But no mention of
 -Wno-unused-parameter).

Near the top of the page, in the paragraph beginning you can request it says:

Each of these specific warning options also has a negative form beginning
`-Wno-' to turn off warnings; for example, -Wno-implicit. This manual lists
only one of the two forms, whichever is not the default.

It would be a waste of time to say it on every option.

 Since I feel like a total ass, perhaps someone can close this feature request.

It's closed :-)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45411



[Bug lto/44812] m32 lto produces non-relocatable subtraction expression errors

2010-08-26 Thread howarth at nitro dot med dot uc dot edu


--- Comment #18 from howarth at nitro dot med dot uc dot edu  2010-08-26 
16:01 ---
Jan's alternative patch...

Index: lto-cgraph.c
===
--- lto-cgraph.c(revision 163494)
+++ lto-cgraph.c(working copy)
@@ -1109,6 +1109,8 @@
   node-analyzed = node-finalized;
   node-used_from_other_partition = bp_unpack_value (bp, 1);
   node-in_other_partition = bp_unpack_value (bp, 1);
+  if (node-in_other_partition)
+DECL_EXTERNAL (node-decl) = 1;
   aliases_p = bp_unpack_value (bp, 1);
   if (node-finalized)
 varpool_mark_needed_node (node);

works only slightly worse than marking the symbols weak. This produces the
failures...

Running target unix/-m32
FAIL: gcc.dg/lto/20090213 c_lto_20090213_0.o-c_lto_20090213_1.o link, -O2
-fwhopr
UNRESOLVED: gcc.dg/lto/20090213 c_lto_20090213_0.o-c_lto_20090213_1.o execute
-O2 -fwhopr
FAIL: gcc.dg/lto/20090218 c_lto_20090218_0.o-c_lto_20090218_3.o link, -O2
-fwhopr
UNRESOLVED: gcc.dg/lto/20090218 c_lto_20090218_0.o-c_lto_20090218_3.o execute
-O2 -fwhopr
FAIL: gcc.dg/lto/ipareference2 c_lto_ipareference2_0.o-c_lto_ipareference2_1.o
execute  -O1 -fwhopr -fwhole-program

in the gcc testsuite. The last failure was suppressed in the previous case.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44812



[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-08-26 Thread rth at gcc dot gnu dot org


--- Comment #2 from rth at gcc dot gnu dot org  2010-08-26 16:27 ---
Created an attachment (id=21571)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21571action=view)
Use altivec.h

Rather than use gcc builtins directly, use the standard header file.
Hopefully this will work with Apple's GCC as well, and continue to
work in the future with any FSF GCC changes.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381



[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-08-26 Thread rth at gcc dot gnu dot org


--- Comment #3 from rth at gcc dot gnu dot org  2010-08-26 16:27 ---
The patch bootstraps on ppc64-linux; please test on Darwin.


-- 

rth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381



[Bug tree-optimization/44485] [4.6 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:1020

2010-08-26 Thread jakub at gcc dot gnu dot org


--- Comment #8 from jakub at gcc dot gnu dot org  2010-08-26 16:39 ---
Subject: Bug 44485

Author: jakub
Date: Thu Aug 26 16:39:26 2010
New Revision: 163568

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163568
Log:
PR tree-optimization/44485
* calls.c (flags_from_decl_or_type): For const or pure
noreturn functions return ECF_LOOPING_CONST_OR_PURE|ECF_NORETURN
together with ECF_CONST resp. ECF_PURE.
* builtins.c (expand_builtin): Use flags_from_decl_or_type
instead of querying flags directly.
* tree-ssa-loop-niter.c (finite_loop_p): Likewise.
* tree-ssa-dce.c (find_obviously_necessary_stmts): Likewise.

* gcc.dg/pr44485.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr44485.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/calls.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-dce.c
trunk/gcc/tree-ssa-loop-niter.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44485



[Bug java/45322] libjava error: libtool: compile: libobj name `ltdl.lo' may not contain shell special

2010-08-26 Thread rwild at gcc dot gnu dot org


--- Comment #1 from rwild at gcc dot gnu dot org  2010-08-26 16:46 ---
Please show
  grep '^SHELL =' alphaev67-dec-osf5.1/libjava/libltdl/Makefile

and if you want Java enabled, please set and export CONFIG_SHELL to some bash
instance before running $CONFIG_SHELL path/to/toplevel/configure ...
as documented in the installation manual.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45322



[Bug tree-optimization/44485] [4.6 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:1020

2010-08-26 Thread jakub at gcc dot gnu dot org


--- Comment #9 from jakub at gcc dot gnu dot org  2010-08-26 16:48 ---
Should be fixed now.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44485



[Bug bootstrap/45381] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: error: AltiVec argument passed to unprototyped function

2010-08-26 Thread dominiq at lps dot ens dot fr


--- Comment #4 from dominiq at lps dot ens dot fr  2010-08-26 16:57 ---
Following a discussion on IRC I have tested the following patch that does not
work with gcc version 4.0.1 (Apple Inc. build 5493) and without 'GCC_VERSION
= 4005'. 

--- /opt/gcc/gcc-4.6-work/libcpp/lex.c  2010-08-25 00:53:19.0 +0200
+++ /opt/gcc/gcc-4.6-work/old-patches/lex.c 2010-08-23 18:46:46.0
+0200
@@ -264,17 +264,7 @@ search_line_acc_char (const uchar *s, co
 }
 }

-/* Disable on Solaris 2/x86 until the following problems can be properly
-   autoconfed:
-
-   The Solaris 8 assembler cannot assemble SSE2/SSE4.2 insns.
-   The Solaris 9 assembler cannot assemble SSE4.2 insns.
-   Before Solaris 9 Update 6, SSE insns cannot be executed.
-   The Solaris 10+ assembler tags objects with the instruction set
-   extensions used, so SSE4.2 executables cannot run on machines that
-   don't support that extension.  */
-
-#if (GCC_VERSION = 4005)  (defined(__i386__) || defined(__x86_64__)) 
!(defined(__sun__)  defined(__svr4__))
+#if (GCC_VERSION = 4005)  (defined(__i386__) || defined(__x86_64__))

 /* Replicated character data to be shared between implementations.
Recall that outside of a context with vector support we can't
@@ -410,7 +400,6 @@ search_line_sse2 (const uchar *s, const 
   return (const uchar *)p + found;
 }

-#ifdef HAVE_SSE4
 /* A version of the fast scanner using SSE 4.2 vectorized string insns.  */

 static const uchar *
@@ -465,11 +454,6 @@ search_line_sse42 (const uchar *s, const
   return s + index;
 }

-#else
-/* Work around out-dated assemblers without sse4 support.  */
-#define search_line_sse42 search_line_sse2
-#endif
-
 /* Check the CPU capabilities.  */

 #include ../gcc/config/i386/cpuid.h
@@ -512,7 +496,8 @@ init_vectorized_lexer (void)
   search_line_fast = impl;
 }

-#elif defined(__GNUC__)  defined(__ALTIVEC__)
+#elif GCC_VERSION = 4005  defined(__ALTIVEC__)
+#include altivec.h

 /* A vection of the fast scanner using AltiVec vectorized byte compares.  */
 /* ??? Unfortunately, attribute(target(altivec)) is not yet supported,
@@ -522,7 +507,7 @@ init_vectorized_lexer (void)
 static const uchar *
 search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
 {
-  typedef __attribute__((altivec(vector))) unsigned char vc;
+  typedef __vector unsigned char vc;

   const vc repl_nl = {
 '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', 
@@ -550,14 +535,14 @@ search_line_fast (const uchar *s, const 

   /* Altivec loads automatically mask addresses with -16.  This lets us
  issue the first load as early as possible.  */
-  data = __builtin_vec_ld(0, (const vc *)s);
+  data = vec_ld(0, (const vc *)s);

   /* Discard bytes before the beginning of the buffer.  Do this by
  beginning with all ones and shifting in zeros according to the
  mis-alignment.  The LVSR instruction pulls the exact shift we
  want from the address.  */
-  mask = __builtin_vec_lvsr(0, s);
-  mask = __builtin_vec_perm(zero, ones, mask);
+  mask = vec_lvsr(0, s);
+  mask = vec_perm(zero, ones, mask);
   data = mask;

   /* While altivec loads mask addresses, we still need to align S so
@@ -571,20 +556,20 @@ search_line_fast (const uchar *s, const 
   vc m_nl, m_cr, m_bs, m_qm;

   s += 16;
-  data = __builtin_vec_ld(0, (const vc *)s);
+  data = vec_ld(0, (const vc *)s);

 start:
-  m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
-  m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
-  m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
-  m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
+  m_nl = (vc) vec_cmpeq(data, repl_nl);
+  m_cr = (vc) vec_cmpeq(data, repl_cr);
+  m_bs = (vc) vec_cmpeq(data, repl_bs);
+  m_qm = (vc) vec_cmpeq(data, repl_qm);
   t = (m_nl | m_cr) | (m_bs | m_qm);

   /* T now contains 0xff in bytes for which we matched one of the relevant
 characters.  We want to exit the loop if any byte in T is non-zero.
 Below is the expansion of vec_any_ne(t, zero).  */
 }
-  while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
+  while (!vec_any_ne(t, zero));

   {
 #define N  (sizeof(vc) / sizeof(long))


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381



[Bug debug/45419] New: -fcompare-debug failure at -O3

2010-08-26 Thread zsojka at seznam dot cz
Command line:
$ gcc -fcompare-debug -O3 testcase-min6.i

Compiler output:
$ gcc -fcompare-debug -O3 testcase-min6.i -w
gcc: error: testcase-min6.i: -fcompare-debug failure (length)

Tested revisions:
r163468 - fail
r162940 - OK
r161659 - OK
r161170 - OK

The failure keeps appearing and disappearing when little changes are made - in
the original testcase, even removing -pipe or adding -save-temps caused the
failure to disappear.


-- 
   Summary: -fcompare-debug failure at -O3
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45419



[Bug debug/45419] -fcompare-debug failure at -O3

2010-08-26 Thread zsojka at seznam dot cz


--- Comment #1 from zsojka at seznam dot cz  2010-08-26 17:12 ---
Created an attachment (id=21572)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21572action=view)
testcase

Delta (with line granularity) fails to reduce the file further. The difference
in debug and non-debug runs is very small:

$ diff pr45419.*gkd
19581c19581
 (compare:CCZ (mem/c:QI (symbol_ref:DI (buf.3274) [flags 0x2] 
var_decl # buf) [ MEM[(char *)buf]+0 S1 A256])
---
 (compare:CCZ (mem/c:QI (symbol_ref:DI (buf.3274) [flags 0x2]  
 var_decl # buf) [ MEM[(const char *)buf]+0 S1 A256])
19913c19913
 (compare:CCZ (mem/c:QI (symbol_ref:DI (buf.3274) [flags 0x2] 
var_decl # buf) [ MEM[(char *)buf]+0 S1 A256])
---
 (compare:CCZ (mem/c:QI (symbol_ref:DI (buf.3274) [flags 0x2]  
 var_decl # buf) [ MEM[(const char *)buf]+0 S1 A256])

only const is missing/added


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45419



[Bug fortran/45420] New: [OOP] poylmorphic TBP calls in a CLASS DEFAULT clause

2010-08-26 Thread janus at gcc dot gnu dot org
Reported by Salvatore at http://gcc.gnu.org/ml/fortran/2010-08/msg00351.html.

Here is a slightly simplified version of the test case:


module base_mat_mod

 type  :: base_sparse_mat
 contains
   procedure, pass(a) :: get_fmt = base_get_fmt
 end type base_sparse_mat

contains

 function base_get_fmt(a) result(res)
   implicit none
   class(base_sparse_mat), intent(in) :: a
   character(len=5) :: res
   res = 'NULL'
 end function base_get_fmt

end module base_mat_mod


module d_base_mat_mod

 use base_mat_mod

 type, extends(base_sparse_mat) :: d_base_sparse_mat
 contains
   procedure, pass(a) :: get_fmt = d_base_get_fmt
 end type d_base_sparse_mat

 type, extends(d_base_sparse_mat) :: x_base_sparse_mat
 contains
   procedure, pass(a) :: get_fmt = x_base_get_fmt
 end type x_base_sparse_mat

contains

 function d_base_get_fmt(a) result(res)
   implicit none
   class(d_base_sparse_mat), intent(in) :: a
   character(len=5) :: res
   res = 'DBASE'
 end function d_base_get_fmt

 function x_base_get_fmt(a) result(res)
   implicit none
   class(x_base_sparse_mat), intent(in) :: a
   character(len=5) :: res
   res = 'XBASE'
 end function x_base_get_fmt

end module d_base_mat_mod


program bug20
  use d_base_mat_mod
  class(d_base_sparse_mat), allocatable  :: a

  allocate(x_base_sparse_mat :: a)
  write(0,*) 'Dynamic type on entry: ',a%get_fmt()

  select type(a)
  type is (d_base_sparse_mat)
write(0,*) 'Dynamic type TYPE IS clause: ',a%get_fmt()
  class default
write(0,*) 'Dynamic type CLASS DEFAULT clause: ',a%get_fmt()
  end select

end program bug20


Current output:

 Dynamic type on entry: XBASE
 Dynamic type CLASS DEFAULT clause: DBASE

Expected output:

 Dynamic type on entry: XBASE
 Dynamic type CLASS DEFAULT clause: XBASE


-- 
   Summary: [OOP] poylmorphic TBP calls in a CLASS DEFAULT clause
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45420



[Bug debug/45419] -fcompare-debug failure at -O3

2010-08-26 Thread hjl dot tools at gmail dot com


--- Comment #2 from hjl dot tools at gmail dot com  2010-08-26 17:46 ---
I can't reproduce it on Fedora 13. But valgrind reports:


Compiler executable checksum: d32748fe5bfee4f2f9ecf4e95f2e1498
==17242== Conditional jump or move depends on uninitialised value(s)
==17242==at 0x7ED1AF: walk_gimple_stmt (gimple.c:1627)
==17242==by 0xB20D9E: dump_enumerated_decls (tree-ssa-live.c:1261)
==17242==by 0xA7CD39: execute_cleanup_cfg_post_optimizing
(tree-optimize.c:214)
==17242==by 0x8F342C: execute_one_pass (passes.c:1568)
==17242==by 0x8F3615: execute_pass_list (passes.c:1623)
==17242==by 0xA7D3D3: tree_rest_of_compilation (tree-optimize.c:452)
==17242==by 0xD0BB5E: cgraph_expand_function (cgraphunit.c:1469)
==17242==by 0xD0BDF6: cgraph_expand_all_functions (cgraphunit.c:1548)
==17242==by 0xD0C41B: cgraph_optimize (cgraphunit.c:1804)
==17242==by 0xD09E6C: cgraph_finalize_compilation_unit (cgraphunit.c:1012)
==17242==by 0x4B238D: c_write_global_declarations (c-decl.c:9735)
==17242==by 0x9EA743: compile_file (toplev.c:983)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45419



[Bug fortran/45420] [OOP] poylmorphic TBP calls in a CLASS DEFAULT clause

2010-08-26 Thread janus at gcc dot gnu dot org


--- Comment #1 from janus at gcc dot gnu dot org  2010-08-26 17:54 ---
The dump shows that the first call to 'get_fmt' is executed dynamically as
'a.$vptr-get_fmt(...)', while the ones inside the SELECT TYPE block are
resolved statically to 'd_base_get_fmt'. For the TYPE IS clause this is fine,
but not so for CLASS DEFAULT, where a polymorphic call should be generated.

F08 quotes (chapter 8.1.9.2):

Within the block following a TYPE IS type guard statement, the associating
entity (16.5.5) is not polymorphic (4.3.1.3), has the type named in the type
guard statement, and has the type parameter values of the selector.

Within the block following a CLASS IS type guard statement, the associating
entity is polymorphic and has the declared type named in the type guard
statement. The type parameter values of the associating entity are the
corresponding type parameter values of the selector.

Within the block following a CLASS DEFAULT type guard statement, the
associating entity is polymorphic and has the same declared type as the
selector. The type parameter values of the associating entity are those of the
declared type of the selector.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45420



[Bug debug/45419] -fcompare-debug failure at -O3

2010-08-26 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2010-08-26 17:58 ---
Unfortunately can't reproduce it myself, neither with bootstrapped, nor with
just stage1 built gcc.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45419



[Bug ada/45421] New: [4.6 regression] Ada bootstrap failure on IRIX 6.5: SEGV in sem_aggr.sort_case_table

2010-08-26 Thread ro at gcc dot gnu dot org
Between 20100709 and 20100823, IRIX6.5 bootstrap with Ada included broke:

$ /vol/gcc/obj/regression/trunk/6.5-gcc/build/./prev-gcc/xgcc
-B/vol/gcc/obj/regression/trunk/6.5-gcc/build/./prev-gcc/
-B/vol/gcc/mips-sgi-irix6.5/bin/ -B/vol/gcc/mips-sgi-irix6.5/bin/
-B/vol/gcc/mips-sgi-irix6.5/lib/ -isystem /vol/gcc/mips-sgi-irix6.5/include
-isystem /vol/gcc/mips-sgi-irix6.5/sys-include-c -g -O2  -gnatpg -gnata
-nostdinc -I- -I. -Iada -I/vol/gcc/src/hg/trunk/local/gcc/ada
-I/vol/gcc/src/hg/trunk/local/gcc/ada/gcc-interface
/vol/gcc/src/hg/trunk/local/gcc/ada/butil.adb -o ada/butil.o
+===GNAT BUG DETECTED==+
| 4.6.0 20100823 (experimental) (mips-sgi-irix6.5) Program_Error SIGBUS|
| Error detected at s-rident.ads:339:27|
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

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

/vol/gcc/src/hg/trunk/local/gcc/ada/system.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/butil.adb
/vol/gcc/src/hg/trunk/local/gcc/ada/butil.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/namet.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/alloc.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/table.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/types.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/unchconv.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/unchdeal.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/hostparm.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/output.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/s-os_lib.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/s-string.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/ada.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/a-uncdea.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/targparm.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/rident.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/s-rident.ads
/vol/gcc/src/hg/t[4.6 regression] Ada bootstrap failure on IRIX 6.5: SEGV in
sem_aggr.sort_case_tablerunk/local/gcc/ada/s-exctab.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/s-stalib.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/a-unccon.ads
/vol/gcc/src/hg/trunk/local/gcc/ada/s-unstyp.ads

compilation abandoned
make[3]: *** [ada/butil.o] Error 1

Running gnat1 under gdb, I find:
(gdb) run -I- -I. -Iada -I/vol/gcc/src/hg/trunk/local/gcc/ada
-I/vol/gcc/src/hg/trunk/local/gcc/ada/gcc-interface -quiet -nostdinc -dumpbase
butil.adb -auxbase-strip ada/butil.o -O2 -g -gnatpg -gnata -mno-synci -mabi=n32
-gnatO ada/butil.o /vol/gcc/src/hg/trunk/local/gcc/ada/butil.adb

Starting program: /var/gcc/regression/trunk/6.5-gcc/build/gcc/gnat1 -I- -I.
-Iada -I/vol/gcc/src/hg/trunk/local/gcc/ada
-I/vol/gcc/src/hg/trunk/local/gcc/ada/gcc-interface -quiet -nostdinc -dumpbase
butil.adb -auxbase-strip ada/butil.o -O2 -g -gnatpg -gnata -mno-synci -mabi=n32
-gnatO ada/butil.o /vol/gcc/src/hg/trunk/local/gcc/ada/butil.adb

Program received signal SIGSEGV, Segmentation fault.
0x10399108 in sem_aggr.sort_case_table (component_typ=value optimized out)
at /vol/gcc/src/hg/trunk/local/gcc/ada/sem_aggr.adb:3978
Current language:  auto
The current source language is auto; currently ada.
(gdb) (gdb) where
#0  0x10399108 in sem_aggr.sort_case_table (
component_typ=value optimized out)
at /vol/gcc/src/hg/trunk/local/gcc/ada/sem_aggr.adb:3978
#1  sem_aggr.resolve_array_aggregate (component_typ=value optimized out)
at /vol/gcc/src/hg/trunk/local/gcc/ada/sem_aggr.adb:1815
#2  0x1039a24c in sem_aggr.resolve_aggregate (n=17450, typ=17262)
at /vol/gcc/src/hg/trunk/local/gcc/ada/sem_aggr.adb:1046
#3  0x1048db30 in sem_res.resolve ()
at /vol/gcc/src/hg/trunk/local/gcc/ada/sem_res.adb:2574
#4  0x10395918 in sem_aggr.resolve_record_aggregate.resolve_aggr_expr (
expr=17450, component=value optimized out)
at /vol/gcc/src/hg/trunk/local/gcc/ada/sem_aggr.adb:2959
#5  0x10397328 in sem_aggr.resolve_record_aggregate (typ=17414)
at /vol/gcc/src/hg/trunk/local/gcc/ada/sem_aggr.adb:3769
#6  0x1039a458 in sem_aggr.resolve_aggregate (n=17447, typ=17414)
at /vol/gcc/src/hg/trunk/local/gcc/ada/sem_aggr.adb:937
#7  0x1048db30 in sem_res.resolve ()
at /vol/gcc/src/hg/trunk/local/gcc/ada/sem_res.adb:2574
#8  0x10397db4 in sem_aggr.resolve_array_aggregate.resolve_aggr_expr (
expr=17447, single_elmt=value optimized out)
at /vol/gcc/src/hg/trunk/local/gcc/ada/sem_aggr.adb:1472
#9  0x10398e08 in 

[Bug middle-end/45422] New: [4.6 Regression] compile time increases 8x.

2010-08-26 Thread jv244 at cam dot ac dot uk
compiling the to-be-attached testcase as:

gfortran -c -ftime-report -cpp -fbounds-check -g -O3 -ffast-math -funroll-loops
-ftree-vectorize -march=native -ffree-form test.f90

massively slowed down in 4.6

4.4:  51s
4.5:  50s
4.6: 434s

the timing report look like:

Execution times (seconds)
 garbage collection:  15.35 ( 4%) usr   0.04 ( 2%) sys  15.35 ( 4%) wall   
   0 kB ( 0%) ggc
 callgraph construction:   0.07 ( 0%) usr   0.01 ( 1%) sys   0.08 ( 0%) wall   
5736 kB ( 0%) ggc
 callgraph optimization:   0.41 ( 0%) usr   0.01 ( 0%) sys   0.34 ( 0%) wall   
 725 kB ( 0%) ggc
 ipa cp:   0.11 ( 0%) usr   0.00 ( 0%) sys   0.11 ( 0%) wall   
1347 kB ( 0%) ggc
 ipa function splitting:   0.03 ( 0%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall   
   0 kB ( 0%) ggc
 ipa reference :   0.02 ( 0%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall   
   0 kB ( 0%) ggc
 ipa profile   :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall   
   0 kB ( 0%) ggc
 ipa pure const:   0.14 ( 0%) usr   0.01 ( 0%) sys   0.19 ( 0%) wall   
   0 kB ( 0%) ggc
 cfg cleanup   :   2.47 ( 1%) usr   0.00 ( 0%) sys   3.10 ( 1%) wall   
4726 kB ( 0%) ggc
 CFG verifier  :   6.48 ( 1%) usr   0.02 ( 1%) sys   6.76 ( 2%) wall   
   0 kB ( 0%) ggc
 trivially dead code   :   0.94 ( 0%) usr   0.00 ( 0%) sys   0.76 ( 0%) wall   
   0 kB ( 0%) ggc
 df multiple defs  :   0.44 ( 0%) usr   0.01 ( 1%) sys   0.37 ( 0%) wall   
   0 kB ( 0%) ggc
 df reaching defs  :   2.38 ( 1%) usr   0.02 ( 1%) sys   2.41 ( 1%) wall   
   0 kB ( 0%) ggc
 df live regs  :  12.32 ( 3%) usr   0.03 ( 2%) sys  12.19 ( 3%) wall   
   0 kB ( 0%) ggc
 df liveinitialized regs:   4.24 ( 1%) usr   0.01 ( 1%) sys   4.31 ( 1%) wall 
 0 kB ( 0%) ggc
 df use-def / def-use chains:   1.72 ( 0%) usr   0.01 ( 1%) sys   1.54 ( 0%)
wall   0 kB ( 0%) ggc
 df live reg subwords  :   0.35 ( 0%) usr   0.00 ( 0%) sys   0.32 ( 0%) wall   
   0 kB ( 0%) ggc
 df reg dead/unused notes:   6.24 ( 1%) usr   0.01 ( 1%) sys   6.17 ( 1%) wall 
  8317 kB ( 0%) ggc
 register information  :   2.34 ( 1%) usr   0.00 ( 0%) sys   2.39 ( 1%) wall   
   0 kB ( 0%) ggc
 alias analysis:   2.25 ( 1%) usr   0.02 ( 1%) sys   2.22 ( 1%) wall  
47018 kB ( 3%) ggc
 alias stmt walking:   0.63 ( 0%) usr   0.03 ( 2%) sys   0.83 ( 0%) wall   
6938 kB ( 0%) ggc
 register scan :   0.37 ( 0%) usr   0.00 ( 0%) sys   0.33 ( 0%) wall   
 298 kB ( 0%) ggc
 rebuild jump labels   :   0.70 ( 0%) usr   0.00 ( 0%) sys   0.67 ( 0%) wall   
   0 kB ( 0%) ggc
 parser:   0.94 ( 0%) usr   0.11 ( 6%) sys   1.06 ( 0%) wall  
55368 kB ( 3%) ggc
 inline heuristics :   0.23 ( 0%) usr   0.00 ( 0%) sys   0.26 ( 0%) wall   
   0 kB ( 0%) ggc
 tree gimplify :   0.64 ( 0%) usr   0.01 ( 0%) sys   0.53 ( 0%) wall  
48405 kB ( 3%) ggc
 tree eh   :   0.02 ( 0%) usr   0.01 ( 1%) sys   0.02 ( 0%) wall   
   0 kB ( 0%) ggc
 tree CFG construction :   0.05 ( 0%) usr   0.00 ( 0%) sys   0.08 ( 0%) wall  
11974 kB ( 1%) ggc
 tree CFG cleanup  :   1.10 ( 0%) usr   0.00 ( 0%) sys   1.34 ( 0%) wall   
3531 kB ( 0%) ggc
 tree VRP  :   2.91 ( 1%) usr   0.04 ( 2%) sys   2.76 ( 1%) wall  
67348 kB ( 4%) ggc
 tree copy propagation :   0.21 ( 0%) usr   0.03 ( 2%) sys   0.25 ( 0%) wall   
1384 kB ( 0%) ggc
 tree find ref. vars   :   0.11 ( 0%) usr   0.01 ( 1%) sys   0.06 ( 0%) wall   
3806 kB ( 0%) ggc
 tree PTA  :   0.36 ( 0%) usr   0.01 ( 1%) sys   0.42 ( 0%) wall   
5199 kB ( 0%) ggc
 tree PHI insertion:   0.02 ( 0%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall   
3194 kB ( 0%) ggc
 tree SSA rewrite  :   0.57 ( 0%) usr   0.00 ( 0%) sys   0.55 ( 0%) wall  
14011 kB ( 1%) ggc
 tree SSA other:   0.10 ( 0%) usr   0.02 ( 1%) sys   0.13 ( 0%) wall   
 432 kB ( 0%) ggc
 tree SSA incremental  :   1.38 ( 0%) usr   0.15 ( 8%) sys   1.62 ( 0%) wall   
7441 kB ( 0%) ggc
 tree operand scan :   0.57 ( 0%) usr   0.36 (18%) sys   0.84 ( 0%) wall  
58289 kB ( 3%) ggc
 dominator optimization:   0.56 ( 0%) usr   0.02 ( 1%) sys   0.65 ( 0%) wall   
8527 kB ( 0%) ggc
 tree SRA  :   0.03 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall   
   0 kB ( 0%) ggc
 tree CCP  :   1.14 ( 0%) usr   0.02 ( 1%) sys   1.15 ( 0%) wall   
4845 kB ( 0%) ggc
 tree PHI const/copy prop:   0.03 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall 
   106 kB ( 0%) ggc
 tree split crit edges :   0.03 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall   
2014 kB ( 0%) ggc
 tree reassociation:   0.24 ( 0%) usr   0.02 ( 1%) sys   0.29 ( 0%) wall   
6030 kB ( 0%) ggc
 tree PRE  :   0.91 ( 0%) usr   0.02 ( 1%) sys   1.08 ( 0%) wall   
7164 kB ( 0%) ggc
 tree FRE  :   0.53 ( 0%) usr   0.01 ( 1%) sys   0.52 ( 0%) wall   
5411 kB ( 0%) ggc
 tree code sinking :   0.05 ( 0%) usr   0.00 ( 0%) sys   0.04 ( 0%) wall   
1311 kB ( 0%) ggc
 tree linearize phis   :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall   
   0 kB ( 

[Bug middle-end/45422] [4.6 Regression] compile time increases 8x.

2010-08-26 Thread jv244 at cam dot ac dot uk


--- Comment #1 from jv244 at cam dot ac dot uk  2010-08-26 18:34 ---
Created an attachment (id=21573)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21573action=view)
testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45422



[Bug debug/45419] -fcompare-debug failure at -O3

2010-08-26 Thread zsojka at seznam dot cz


--- Comment #4 from zsojka at seznam dot cz  2010-08-26 18:37 ---
Created an attachment (id=21574)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21574action=view)
different testcase

Thank you for answers! This not yet reduced testcase fails in a similiar way
(r163468, x86_64-linux). It needs only -O2 to reproduce.

$ gcc -std=gnu++0x -fcompare-debug -O2 040.ii -w
gcc: error: 040.ii: -fcompare-debug failure (length)
$ diff 040.*gkd
54739c54739
 (const_int 8 [0x8]))) [ MEM[(const struct OverflowSafeInt
)CMD_ERROR + 8].m_value+0 S8 A64])
---
 (const_int 8 [0x8]))) [ MEM[(struct OverflowSafeInt 
 *)CMD_ERROR + 8B].m_value+0 S8 A64])

It shows 3 differences:
missing const
 - * (PR45408)
8 - 8B

Information about gcc used:
$ /mnt/svn/gcc-trunk/binary-163468-lto-fortran-checking-yes-rtl-df/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-163468-lto-fortran-checking-yes-rtl-df/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-163468-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk/configure
--enable-languages=c,c++,lto,fortran
--prefix=/mnt/svn/gcc-trunk/binary-163468-lto-fortran-checking-yes-rtl-df/
--enable-checking=yes,rtl,df
Thread model: posix
gcc version 4.6.0 20100823 (experimental) (GCC)

$ cat /proc/sys/kernel/randomize_va_space
0


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45419



[Bug middle-end/45423] New: #pragma omp atomic on bool has issues

2010-08-26 Thread jakub at gcc dot gnu dot org
bool b;
int i;
int
foo (void)
{
  #pragma omp atomic
b ^= 1;
  #pragma omp barrier
  #pragma omp atomic
b |= 1;
  #pragma omp barrier
  #pragma omp atomic
b = 1;
  #pragma omp barrier
  #pragma omp atomic
b -= 1;
  #pragma omp barrier
  #pragma omp atomic
i ^= 1;
  #pragma omp barrier
  #pragma omp atomic
i |= 1;
  #pragma omp barrier
  #pragma omp atomic
i = 1;
  #pragma omp barrier
  #pragma omp atomic
i -= 1;
  #pragma omp barrier
  #pragma omp atomic
i = -1;
  #pragma omp barrier
  #pragma omp atomic
i |= -1;
  #pragma omp barrier
  return 0;
}

shows that b ^= 1 and b -= 1 isn't gimplified correctly - an expression reading
the variable before atomic_load is used in atomic_store instead of something
reading from the var in the atomic region.


-- 
   Summary: #pragma omp atomic on bool has issues
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Keywords: openmp
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45423



[Bug middle-end/45423] #pragma omp atomic on bool has issues

2010-08-26 Thread jakub at gcc dot gnu dot org


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-08-26 19:17:35
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45423



[Bug debug/45419] -fcompare-debug failure at -O3

2010-08-26 Thread hjl dot tools at gmail dot com


--- Comment #5 from hjl dot tools at gmail dot com  2010-08-26 19:48 ---
valgrind issue is caused by revision 162156:

http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg00510.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||amylaar at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45419



[Bug fortran/38936] F2003: ASSOCIATE construct / improved SELECT TYPE (a=expr)

2010-08-26 Thread domob at gcc dot gnu dot org


--- Comment #13 from domob at gcc dot gnu dot org  2010-08-26 19:49 ---
Subject: Bug 38936

Author: domob
Date: Thu Aug 26 19:48:43 2010
New Revision: 163572

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163572
Log:
2010-08-26  Daniel Kraft  d...@domob.eu

PR fortran/38936
PR fortran/44047
PR fortran/45384
* gfortran.h (struct gfc_association_list): New flag `dangling'.
(gfc_build_block_ns): Declared here...
* parse.h (gfc_build_block_ns): ...instead of here.
* trans.h (gfc_process_block_locals): Expect additionally the
gfc_association_list of BLOCK (if present).
* match.c (select_type_set_tmp): Create sym-assoc for temporary.
* resolve.c (resolve_variable): Only check for invalid *array*
references on associate-names.
(resolve_assoc_var): New method with code previously in resolve_symbol.
(resolve_select_type): Use association to give the selector and
temporaries their values instead of ordinary assignment.
(resolve_fl_var_and_proc): Allow CLASS associate-names.
(resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
* trans-stmt.c (gfc_trans_block_construct): Pass association-list
to `gfc_process_block_locals' to match new interface.
* trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
here automatically.
(gfc_process_block_locals): Defer them rather here when linked to
from the BLOCK's association list.

2010-08-26  Daniel Kraft  d...@domob.eu

PR fortran/38936
PR fortran/44047
PR fortran/45384
* gfortran.dg/associate_8.f03: New test.
* gfortran.dg/select_type_13.f03: New test.
* gfortran.dg/select_type_14.f03: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/associate_8.f03
trunk/gcc/testsuite/gfortran.dg/select_type_13.f03
trunk/gcc/testsuite/gfortran.dg/select_type_14.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/match.c
trunk/gcc/fortran/parse.h
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38936



[Bug fortran/45384] [OOP] double free with SELECT TYPE

2010-08-26 Thread domob at gcc dot gnu dot org


--- Comment #9 from domob at gcc dot gnu dot org  2010-08-26 19:49 ---
Subject: Bug 45384

Author: domob
Date: Thu Aug 26 19:48:43 2010
New Revision: 163572

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163572
Log:
2010-08-26  Daniel Kraft  d...@domob.eu

PR fortran/38936
PR fortran/44047
PR fortran/45384
* gfortran.h (struct gfc_association_list): New flag `dangling'.
(gfc_build_block_ns): Declared here...
* parse.h (gfc_build_block_ns): ...instead of here.
* trans.h (gfc_process_block_locals): Expect additionally the
gfc_association_list of BLOCK (if present).
* match.c (select_type_set_tmp): Create sym-assoc for temporary.
* resolve.c (resolve_variable): Only check for invalid *array*
references on associate-names.
(resolve_assoc_var): New method with code previously in resolve_symbol.
(resolve_select_type): Use association to give the selector and
temporaries their values instead of ordinary assignment.
(resolve_fl_var_and_proc): Allow CLASS associate-names.
(resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
* trans-stmt.c (gfc_trans_block_construct): Pass association-list
to `gfc_process_block_locals' to match new interface.
* trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
here automatically.
(gfc_process_block_locals): Defer them rather here when linked to
from the BLOCK's association list.

2010-08-26  Daniel Kraft  d...@domob.eu

PR fortran/38936
PR fortran/44047
PR fortran/45384
* gfortran.dg/associate_8.f03: New test.
* gfortran.dg/select_type_13.f03: New test.
* gfortran.dg/select_type_14.f03: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/associate_8.f03
trunk/gcc/testsuite/gfortran.dg/select_type_13.f03
trunk/gcc/testsuite/gfortran.dg/select_type_14.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/match.c
trunk/gcc/fortran/parse.h
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45384



[Bug fortran/44047] [OOP] SELECT TYPE with associate-name and allocatable selector

2010-08-26 Thread domob at gcc dot gnu dot org


--- Comment #2 from domob at gcc dot gnu dot org  2010-08-26 19:49 ---
Subject: Bug 44047

Author: domob
Date: Thu Aug 26 19:48:43 2010
New Revision: 163572

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163572
Log:
2010-08-26  Daniel Kraft  d...@domob.eu

PR fortran/38936
PR fortran/44047
PR fortran/45384
* gfortran.h (struct gfc_association_list): New flag `dangling'.
(gfc_build_block_ns): Declared here...
* parse.h (gfc_build_block_ns): ...instead of here.
* trans.h (gfc_process_block_locals): Expect additionally the
gfc_association_list of BLOCK (if present).
* match.c (select_type_set_tmp): Create sym-assoc for temporary.
* resolve.c (resolve_variable): Only check for invalid *array*
references on associate-names.
(resolve_assoc_var): New method with code previously in resolve_symbol.
(resolve_select_type): Use association to give the selector and
temporaries their values instead of ordinary assignment.
(resolve_fl_var_and_proc): Allow CLASS associate-names.
(resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
* trans-stmt.c (gfc_trans_block_construct): Pass association-list
to `gfc_process_block_locals' to match new interface.
* trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
here automatically.
(gfc_process_block_locals): Defer them rather here when linked to
from the BLOCK's association list.

2010-08-26  Daniel Kraft  d...@domob.eu

PR fortran/38936
PR fortran/44047
PR fortran/45384
* gfortran.dg/associate_8.f03: New test.
* gfortran.dg/select_type_13.f03: New test.
* gfortran.dg/select_type_14.f03: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/associate_8.f03
trunk/gcc/testsuite/gfortran.dg/select_type_13.f03
trunk/gcc/testsuite/gfortran.dg/select_type_14.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/match.c
trunk/gcc/fortran/parse.h
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44047



[Bug fortran/44047] [OOP] SELECT TYPE with associate-name and allocatable selector

2010-08-26 Thread domob at gcc dot gnu dot org


--- Comment #3 from domob at gcc dot gnu dot org  2010-08-26 19:51 ---
Fixed.


-- 

domob at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44047



[Bug fortran/45384] [OOP] double free with SELECT TYPE

2010-08-26 Thread domob at gcc dot gnu dot org


--- Comment #10 from domob at gcc dot gnu dot org  2010-08-26 19:52 ---
Fixed.


-- 

domob at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45384



[Bug fortran/38936] F2003: ASSOCIATE construct / improved SELECT TYPE (a=expr)

2010-08-26 Thread domob at gcc dot gnu dot org


--- Comment #14 from domob at gcc dot gnu dot org  2010-08-26 19:54 ---
This fixed association to CLASS entities and also reworked SELECT TYPE to use
the same workings internally.  Still open:  Association to strings and
derived-types, and the extended checks for illegal usage of names associated to
expressions.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38936



[Bug fortran/45420] [OOP] poylmorphic TBP calls in a CLASS DEFAULT clause

2010-08-26 Thread janus at gcc dot gnu dot org


--- Comment #2 from janus at gcc dot gnu dot org  2010-08-26 19:55 ---
It turns out this bug is rather easy to fix. The problem was the we used the
temporary needed for the TYPE IS clause also in the CLASS DEFAULT clause (where
we need none). The following patch fixes it (haven't checked for regressions
yet):

Index: gcc/fortran/match.c
===
--- gcc/fortran/match.c (revision 163470)
+++ gcc/fortran/match.c (working copy)
@@ -4460,6 +4460,12 @@ select_type_set_tmp (gfc_typespec *ts)
   char name[GFC_MAX_SYMBOL_LEN];
   gfc_symtree *tmp;

+  if (!ts)
+{
+  select_type_stack-tmp = NULL;
+  return;
+}
+  
   if (!gfc_type_is_extensible (ts-u.derived))
 return;

@@ -4702,6 +4708,7 @@ gfc_match_class_is (void)
   c-where = gfc_current_locus;
   c-ts.type = BT_UNKNOWN;
   new_st.ext.case_list = c;
+  select_type_set_tmp (NULL);
   return MATCH_YES;
 }


-- 

janus at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |janus at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-08-26 19:55:39
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45420



[Bug debug/45419] -fcompare-debug failure at -O3

2010-08-26 Thread hjl dot tools at gmail dot com


--- Comment #6 from hjl dot tools at gmail dot com  2010-08-26 20:02 ---
(In reply to comment #4)
 Created an attachment (id=21574)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21574action=view) [edit]
 different testcase
 
 Thank you for answers! This not yet reduced testcase fails in a similiar way
 (r163468, x86_64-linux). It needs only -O2 to reproduce.
 
 $ gcc -std=gnu++0x -fcompare-debug -O2 040.ii -w
 gcc: error: 040.ii: -fcompare-debug failure (length)
 $ diff 040.*gkd
 54739c54739
  (const_int 8 [0x8]))) [ MEM[(const struct 
 OverflowSafeInt
 )CMD_ERROR + 8].m_value+0 S8 A64])
 ---
  (const_int 8 [0x8]))) [ MEM[(struct OverflowSafeInt 
  *)CMD_ERROR + 8B].m_value+0 S8 A64])
 
 It shows 3 differences:
 missing const
  - * (PR45408)
 8 - 8B
 


This is caused by revision 161655:

http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg6.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-08-26 20:02:30
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45419



[Bug lto/44812] m32 lto produces non-relocatable subtraction expression errors

2010-08-26 Thread dominiq at lps dot ens dot fr


--- Comment #19 from dominiq at lps dot ens dot fr  2010-08-26 20:03 ---
With the patch in comment #18, with -m64 I see the following failure

FAIL: gcc.dg/lto/ipareference2 c_lto_ipareference2_0.o-c_lto_ipareference2_1.o
execute  -O1 -fwhopr -fwhole-program

which was only present with -m32 without the patch. Otherwise the patch fixes
many failures for the gcc and g++ test suites.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44812



[Bug fortran/45420] [OOP] polymorphic TBP call in a CLASS DEFAULT clause

2010-08-26 Thread janus at gcc dot gnu dot org


-- 

janus at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|[OOP] poylmorphic TBP calls |[OOP] polymorphic TBP call
   |in a CLASS DEFAULT clause   |in a CLASS DEFAULT clause
   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45420



[Bug rtl-optimization/45416] Code size regression between 4.6(4.5) and 4.4 for ARM

2010-08-26 Thread mikpe at it dot uu dot se


--- Comment #5 from mikpe at it dot uu dot se  2010-08-26 21:13 ---
The code size regression on ARM is caused by r146817, Matz' expand from SSA
patch: http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg01459.html

Here's the diff in the assembly code generated by a cross to
armv5tel-linux-gnueabi, with -Os -S, for r146816 and r146817:

--- pr45316.s-r146816   2010-08-26 23:00:18.0 +0200
+++ pr45316.s-r146817   2010-08-26 23:03:24.0 +0200
@@ -17,8 +17,13 @@
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
-   mov r0, r0, lsr #10
-   and r0, r0, #1
+   mov r2, #1024
+   mov r3, #0
+   and r2, r2, r0
+   and r3, r3, r1
+   orrsr1, r2, r3
+   moveq   r0, #0
+   movne   r0, #1
bx  lr
.size   foo, .-foo
.ident  GCC: (GNU) 4.5.0 20090426 (experimental)

My cross was configured:
../gcc-4.5-r146817/configure --target=armv5tel-unknown-linux-gnueabi
--with-arch=armv5te --with-tune=xscale --disable-plugin --disable-lto
--disable-nls --disable-shared --disable-libmudflap --disable-multilib
--enable-threads=posix --enable-checking=release --enable-languages=c


-- 

mikpe at it dot uu dot se changed:

   What|Removed |Added

 CC||matz at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416



[Bug lto/44812] m32 lto produces non-relocatable subtraction expression errors

2010-08-26 Thread dominiq at lps dot ens dot fr


--- Comment #20 from dominiq at lps dot ens dot fr  2010-08-27 00:09 ---
The patch in comment #18 works also on powerpc-apple-darwin9:

Running target unix/-m32
Using /sw/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /sw/share/dejagnu/config/unix.exp as generic interface file for target.
Using /opt/gcc/gcc-4.6-work/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running /opt/gcc/gcc-4.6-work/gcc/testsuite/gcc.dg/lto/lto.exp ...
FAIL: gcc.dg/lto/20090213 c_lto_20090213_0.o-c_lto_20090213_1.o link, -O2
-fwhopr
FAIL: gcc.dg/lto/20090218 c_lto_20090218_0.o-c_lto_20090218_3.o link, -O2
-fwhopr
FAIL: gcc.dg/lto/ipareference2 c_lto_ipareference2_0.o-c_lto_ipareference2_1.o
execute  -O1 -fwhopr -fwhole-program

=== gcc Summary for unix/-m32 ===

# of expected passes613
# of unexpected failures3
# of unresolved testcases   2
# of unsupported tests  8
Running target unix/-m64
Using /sw/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /sw/share/dejagnu/config/unix.exp as generic interface file for target.
Using /opt/gcc/gcc-4.6-work/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running /opt/gcc/gcc-4.6-work/gcc/testsuite/gcc.dg/lto/lto.exp ...
FAIL: gcc.dg/lto/20090116 c_lto_20090116_0.o-c_lto_20090116_0.o link, -O1
-fwhopr -fPIC (internal compiler error)
FAIL: gcc.dg/lto/20090213 c_lto_20090213_0.o-c_lto_20090213_1.o link, -O2
-fwhopr
FAIL: gcc.dg/lto/20090218 c_lto_20090218_0.o-c_lto_20090218_3.o link, -O2
-fwhopr
FAIL: gcc.dg/lto/ipareference2 c_lto_ipareference2_0.o-c_lto_ipareference2_1.o
execute  -O1 -fwhopr -fwhole-program

=== gcc Summary for unix/-m64 ===

# of expected passes612
# of unexpected failures4
# of unresolved testcases   3
# of unsupported tests  8

=== gcc Summary ===

# of expected passes1225
# of unexpected failures7
# of unresolved testcases   5
# of unsupported tests  16
/opt/gcc/darwin_buildw/gcc/xgcc  version 4.6.0 20100825 (experimental) [trunk
revision 163553p1] (GCC) 

with an extra ICE for gcc.dg/lto/20090116.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44812



[Bug lto/44812] m32 lto produces non-relocatable subtraction expression errors

2010-08-26 Thread howarth at nitro dot med dot uc dot edu


--- Comment #21 from howarth at nitro dot med dot uc dot edu  2010-08-27 
00:42 ---
Created an attachment (id=21575)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21575action=view)
patch which completely eliminates -m32 darwin lto failures


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44812



[Bug lto/44812] m32 lto produces non-relocatable subtraction expression errors

2010-08-26 Thread howarth at nitro dot med dot uc dot edu


--- Comment #22 from howarth at nitro dot med dot uc dot edu  2010-08-27 
00:44 ---
The m32_lto_fix2.diff patch expands the usage of DECL_WEAK into
gcc/lto-cgraph.c and is sufficient to eliminate all of the darwin-specific lto
failures at -m32. The only remaining ones are...


FAIL: g++.dg/lto/20100723-1 cp_lto_20100723-1_0.o-cp_lto_20100723-1_0.o link,
-fcompare-debug -flto (internal compiler error)
UNRESOLVED: g++.dg/lto/20100723-1 cp_lto_20100723-1_0.o-cp_lto_20100723-1_0.o
execute -fcompare-debug -flto
FAIL: g++.dg/lto/20100723-1 cp_lto_20100723-1_0.o-cp_lto_20100723-1_0.o link,
-fcompare-debug -fwhopr (internal compiler error)
UNRESOLVED: g++.dg/lto/20100723-1 cp_lto_20100723-1_0.o-cp_lto_20100723-1_0.o
execute -fcompare-debug -fwhopr


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44812



[Bug libgcj/40868] ecjx.cc should be compiled by host gcc

2010-08-26 Thread rwild at gcc dot gnu dot org


--- Comment #10 from rwild at gcc dot gnu dot org  2010-08-27 04:27 ---
Subject: Bug 40868

Author: rwild
Date: Fri Aug 27 04:27:40 2010
New Revision: 163580

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163580
Log:
Fix building ecjx in cross compile mode.

libjava/:
PR libgcj/40868
* configure.ac: Add GCC_FOR_ECJX variable.  Ensure
GCJ_FOR_ECJX is always set.
* Makefile.am [!NATIVE] (ecjx.$(OBJEXT)): New rule.
* Makefile.in: Regenerate.
* configure: Regenerate.
* gcj/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.

Modified:
trunk/libjava/ChangeLog
trunk/libjava/Makefile.am
trunk/libjava/Makefile.in
trunk/libjava/configure
trunk/libjava/configure.ac
trunk/libjava/gcj/Makefile.in
trunk/libjava/include/Makefile.in
trunk/libjava/testsuite/Makefile.in


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40868



[Bug libgcj/40868] ecjx.cc should be compiled by host gcc

2010-08-26 Thread rwild at gcc dot gnu dot org


--- Comment #11 from rwild at gcc dot gnu dot org  2010-08-27 04:30 ---
Fixed.


-- 

rwild at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40868