[Bug libfortran/48785] BOZ editing of real numbers not working with -std=f2008

2011-04-27 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48785

Tobias Burnus  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org,
   ||jvdelisle at gcc dot
   ||gnu.org

--- Comment #1 from Tobias Burnus  2011-04-27 
06:55:48 UTC ---
In libgfortran/io/transfer.c's one currently has in
formatted_transfer_scalar_read and formatted_transfer_scalar_write code such as

case FMT_B:
  if (n == 0)
goto need_data;
  if (!(compile_options.allow_std & GFC_STD_GNU)
  && require_type (dtp, BT_INTEGER, type, f))
return;
  write_b (dtp, f, p, kind);
  break;

s/GFC_STD_GNU/GFC_STD_F2008/ should take care of that. However, that might
accept too much, namely CHARACTER and LOGICAL, which are excluded at: "The
corresponding input/output list item shall be of type integer, real, or
complex."

I don't know whether we should care - I tend to be more liberal for run-time
diagnostic than for compile-time diagnostic ...


[Bug c/48742] [4.5/4.6/4.7 Regression] Internal error in gimplify_expr

2011-04-27 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48742

--- Comment #6 from Jakub Jelinek  2011-04-27 
07:04:29 UTC ---
Author: jakub
Date: Wed Apr 27 07:04:25 2011
New Revision: 173011

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173011
Log:
PR c/48742
* c-typeck.c (build_binary_op): Don't wrap arguments if
int_operands is true.

* gcc.c-torture/compile/pr48742.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr48742.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-typeck.c
trunk/gcc/testsuite/ChangeLog


[Bug c/48742] [4.5/4.6/4.7 Regression] Internal error in gimplify_expr

2011-04-27 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48742

--- Comment #7 from Jakub Jelinek  2011-04-27 
07:05:56 UTC ---
Author: jakub
Date: Wed Apr 27 07:05:54 2011
New Revision: 173012

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173012
Log:
PR c/48742
* c-typeck.c (build_binary_op): Don't wrap arguments if
int_operands is true.

* gcc.c-torture/compile/pr48742.c: New test.

Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.c-torture/compile/pr48742.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/c-typeck.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


[Bug tree-optimization/48765] ICE in vect_transform_stmt

2011-04-27 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48765

Ira Rosen  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.04.27 07:25:43
 CC||irar at il dot ibm.com
 Ever Confirmed|0   |1

--- Comment #2 from Ira Rosen  2011-04-27 07:25:43 UTC 
---
I'll take a look.

Ira


[Bug fortran/48786] New: [OOP] Generic ambiguity check too strict for polymorphic dummies

2011-04-27 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48786

   Summary: [OOP] Generic ambiguity check too strict for
polymorphic dummies
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Keywords: rejects-valid
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: bur...@gcc.gnu.org
CC: ja...@gcc.gnu.org


Created attachment 24110
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24110
Example program

Reported at c.l.f by Arjen Markus
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/4a4e885f68b660bd

I have not really thought about the issue, but I believe gfortran wrongly
rejects the program.


One has:
  type point2d
with
  generic, public :: operator(+) => add_vector
and
  type, extends(point2d) :: point3d
with
  generic, public :: operator(+) => add_vector_3dversion

As one can pass any "point3d" data type to either add_vector_3dversion or
add_vector, gfortran complains:
  Error: 'add_vector_3d' and 'add_vector_2d' for GENERIC '+' at (1) are
ambiguous

However, the TKI is different, and thus I believe the error message is wrong -
in calls, add_vector_3d should be preferred and only if not available, one
should fall back to add_vector_2d.

"A dummy argument is type, kind, and rank compatible, or TKR compatible, with
another dummy argument if the first is type compatible with the second, the
kind type parameters of the first have the same values as the corresponding
kind type parameters of the second, and both have the same rank." (F2008,
12.4.3.4.5)

-> I believe the arguments have a different (declared) type.

It should also be somewhat compatible with: "12.5.5.2 Resolving procedure
references to names established to be generic" - but there it does not tell
which function one should call. Admittedly, I am a bit lost.


[Bug c/48742] [4.5 Regression] Internal error in gimplify_expr

2011-04-27 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48742

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
  Known to work||4.6.1, 4.7.0
 AssignedTo|unassigned at gcc dot   |jakub at gcc dot gnu.org
   |gnu.org |
Summary|[4.5/4.6/4.7 Regression]|[4.5 Regression] Internal
   |Internal error in   |error in gimplify_expr
   |gimplify_expr   |
  Known to fail||4.5.2

--- Comment #8 from Jakub Jelinek  2011-04-27 
07:17:27 UTC ---
Fixed for 4.6+ so far.


[Bug middle-end/48752] [4.7 Regression] ICE in evaulate_conditions_for_edge at ipa-inline-analysis.c:466

2011-04-27 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48752

--- Comment #13 from Jan Hubicka  2011-04-27 07:46:00 
UTC ---
Hi,
this patch is not really tested, I need to construct a testcase that reproduces
fo rme, but it
adds the mising add_new_function hook and should solve the problem.

Honza

Index: ipa-prop.c
===
*** ipa-prop.c(revision 172989)
--- ipa-prop.c(working copy)
*** static struct cgraph_edge_hook_list *edg
*** 63,68 
--- 63,69 
  static struct cgraph_node_hook_list *node_removal_hook_holder;
  static struct cgraph_2edge_hook_list *edge_duplication_hook_holder;
  static struct cgraph_2node_hook_list *node_duplication_hook_holder;
+ static struct cgraph_node_hook_list *function_insertion_hook_holder;

  /* Add cgraph NODE described by INFO to the worklist WL regardless of whether
 it is in one or not.  It should almost never be used directly, as opposed
to
*** ipa_node_duplication_hook (struct cgraph
*** 2058,2063 
--- 2059,2073 
new_info->node_enqueued = old_info->node_enqueued;
  }

+ 
+ /* Analyze newly added function into callgraph.  */
+ 
+ static void
+ ipa_add_new_function (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
+ {
+   ipa_analyze_node (node);
+ }
+ 
  /* Register our cgraph hooks if they are not already there.  */

  void
*** ipa_register_cgraph_hooks (void)
*** 2075,2080 
--- 2085,2092 
if (!node_duplication_hook_holder)
  node_duplication_hook_holder =
cgraph_add_node_duplication_hook (&ipa_node_duplication_hook, NULL);
+   function_insertion_hook_holder =
+   cgraph_add_function_insertion_hook (&ipa_add_new_function, NULL);
  }

  /* Unregister our cgraph hooks if they are not already there.  */
*** ipa_unregister_cgraph_hooks (void)
*** 2090,2095 
--- 2102,2109 
edge_duplication_hook_holder = NULL;
cgraph_remove_node_duplication_hook (node_duplication_hook_holder);
node_duplication_hook_holder = NULL;
+   cgraph_remove_function_insertion_hook (function_insertion_hook_holder);
+   function_insertion_hook_holder = NULL;
  }

  /* Allocate all necessary data structures necessary for indirect inlining. 
*/


[Bug middle-end/48752] [4.7 Regression] ICE in evaulate_conditions_for_edge at ipa-inline-analysis.c:466

2011-04-27 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48752

--- Comment #12 from Jan Hubicka  2011-04-27 
07:30:36 UTC ---
Hi,
the problem is that ipa-prop is not really looking for newly inserted
functions. So inliner knows about the arguments but asks the ipa-prop machinery
that doesn't. I will add the missing add_new_function hook.

I still can't reproduce the testcase but I guess I can make one myself just by
forcing global constructor.  Will try to have patch before lunch.

Will also fix my dyslectic Czenglish ;)


[Bug target/48673] [4.7 Regression] GCC generates WAW and RAW conflicts on IA64.

2011-04-27 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48673

Andrey Belevantsev  changed:

   What|Removed |Added

 CC||abel at gcc dot gnu.org

--- Comment #1 from Andrey Belevantsev  2011-04-27 
08:01:19 UTC ---
Steve, can you reproduce this on the latest trunk?  I have tried to look at
this but I cannot reproduce the problem at 173004.


[Bug target/43603] gcc-4.4.3 ICE on ia64 with -O3

2011-04-27 Thread devurandom at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43603

--- Comment #15 from devurandom at gmx dot net 2011-04-27 07:45:19 UTC ---
(In reply to comment #14)
> (In reply to comment #13)
> > Fixed on 4.5.
Can it please be fixed in 4.4, too? (Maybe I am wrong, but I see only commits
to trunk/4.6 and 4.5 here.)


[Bug target/43603] gcc-4.4.3 ICE on ia64 with -O3

2011-04-27 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43603

--- Comment #16 from Andrey Belevantsev  2011-04-27 
08:10:12 UTC ---
The patch from 4.5 can likely be ported to 4.4 somewhat easy, however, it is
big enough and I am not sure that there will be any more releases off
4.4-branch.  If there is such a need of having this in 4.4, and if there will
indeed be another 4.4 release, I can do the porting.


[Bug libfortran/48787] New: Invalid UP rounding with F editing

2011-04-27 Thread thenlich at users dot sourceforge.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48787

   Summary: Invalid UP rounding with F editing
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: libfortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: thenl...@users.sourceforge.net


When UP output rounding is in effect, the output of F editing is rounded
incorrectly. In the example, real numbers with an exact internal representation
(whole numbers) are rounded up to the next higher value.

program test_ruf
print "(ru,f2.0)", 2.0_4 ! 3. expected 2.
print "(ru,f2.0)", 2.0_8 ! 3. expected 2.
print "(ru,f2.0)", 2.0_10 ! 3. expected 2.
print "(ru,f2.0)", 2.0_16 ! 3. expected 2.
end program test_ruf

Tested with gcc-Version 4.7.0 20110424 (experimental) [trunk revision 172919]
(GCC) 

Fortran 2008:
When the I/O rounding mode is UP, the value resulting from conversion shall be
the smallest representable value that is greater than or equal to the original
value.


[Bug target/43603] gcc-4.4.3 ICE on ia64 with -O3

2011-04-27 Thread devurandom at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43603

--- Comment #18 from devurandom at gmx dot net 2011-04-27 08:26:51 UTC ---
P.S: Maybe you can backport it anyway, since I opened Gentoo bug #365045 [1].
Having the backport readily available from upstream would probably help
including it in a distro release of GCC.

[1] http://bugs.gentoo.org/show_bug.cgi?id=365045


[Bug target/43603] gcc-4.4.3 ICE on ia64 with -O3

2011-04-27 Thread devurandom at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43603

--- Comment #17 from devurandom at gmx dot net 2011-04-27 08:25:13 UTC ---
This bug prevents Erlang 14B2 from building on my machine, so for me it is
serious. Someone else has to tell whether there will be further 4.4 releases,
of course.


[Bug c++/48771] [C++0x] is_literal_type incorrect for references to non-literal types

2011-04-27 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48771

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC|paolo.carlini at oracle dot |
   |com |
 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot
   |gnu.org |com

--- Comment #4 from Paolo Carlini  2011-04-27 
08:26:13 UTC ---
Ok, thanks, patch to the mailing list forthcoming.

I'm also considering removing valid_type_in_constexpr_fundecl_p altogether and
replacing the two calls with literal_type_p directly.


[Bug libstdc++/48760] [4.6 / 4.7 Regression] std::complex constructor buggy in the face of NaN's

2011-04-27 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48760

Paolo Carlini  changed:

   What|Removed |Added

Summary|[4.6 / 4.7 Regression (?)]  |[4.6 / 4.7 Regression]
   |std::complex constructor|std::complex constructor
   |buggy in the face of NaN's  |buggy in the face of NaN's

--- Comment #21 from Paolo Carlini  2011-04-27 
09:08:31 UTC ---
Ok, thanks, let's see what I can do over the next days, I'll contact you again
if I will get stuck.

PS: C++1x is private jargon, but well, as -std= argument, together with c++0x
we'll need something more realistic, at some point, don't you think? ;)


[Bug target/43603] gcc-4.4.3 ICE on ia64 with -O3

2011-04-27 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43603

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #19 from Jakub Jelinek  2011-04-27 
09:23:35 UTC ---
4.4.7 release is tentatively planned, roughly for late Autumn 2011.


[Bug target/44618] [4.4/4.5/4.6/4.7 regression] wrong code with -frename-registers

2011-04-27 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44618

Eric Botcazou  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot
   ||gnu.org
   Target Milestone|--- |4.4.7
Summary|Arguments are not passed|[4.4/4.5/4.6/4.7
   |correctly to out-of-line|regression] wrong code with
   |restore functions.  |-frename-registers


[Bug c/48783] ARM: kernel compiled at -O2 has a unused reference to __aeabi_uldivmod

2011-04-27 Thread ams at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48783

Andrew Stubbs  changed:

   What|Removed |Added

 CC||ams at gcc dot gnu.org

--- Comment #1 from Andrew Stubbs  2011-04-27 09:15:08 
UTC ---
I don't see any call to __aeabi_uldivmod???

I *do* see __aeabi_uidivmod, and that does seem to be called properly.

I get:

.global __aeabi_uidiv   
.global __aeabi_uidivmod
.align  2
.thumb  
.thumb_func 
.type   pll_factors, %function
pll_factors:
.fnstart
[.]
.L54:   
ldrbr3, [r6, #0]@ zero_extendqisi2
mov r0, r7
mov r1, r4
bfi r3, r5, #1, #4
strbr3, [r6, #0]
bl  __aeabi_uidivmod
movwr5, #52429
movtr5, 52428
mov r0, #167772160
umull   r0, r1, r1, r0
[.]

I can't find a bug here?


[Bug libstdc++/48750] for_each_template_random_access_ed has unbalanced new/delete[]

2011-04-27 Thread bugs at sehe dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48750

--- Comment #15 from Seth Heeren  2011-04-27 09:51:26 UTC 
---
Probably redundant info, but the compiler used in my prior post is

sehe@sid:~$ g++-4.6 -v   
Using built-in specs.
COLLECT_GCC=g++-4.6
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.6.1/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.0-2'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-plugin --enable-gold --enable-ld=default --with-plugin-ld
--enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.6.1 20110329 (prerelease) (Debian 4.6.0-2)


[Bug c/48783] ARM: kernel compiled at -O2 has a unused reference to __aeabi_uldivmod

2011-04-27 Thread michael.hope at linaro dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48783

--- Comment #2 from Michael Hope  2011-04-27 
09:52:09 UTC ---
Sorry, the original attachment included the __attribute__((noinline))
workaround on pll_factors().  Attached is the original that shows the fault.


[Bug rtl-optimization/48774] [4.6/4.7 Regression] gcc-4.6.0 optimization regression on x86_64-unknown-linux-gnu

2011-04-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48774

Richard Guenther  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.04.27 09:49:15
   Target Milestone|--- |4.6.1
Summary|gcc-4.6.0 optimization  |[4.6/4.7 Regression]
   |regression on   |gcc-4.6.0 optimization
   |x86_64-unknown-linux-gnu|regression on
   ||x86_64-unknown-linux-gnu
 Ever Confirmed|0   |1
  Known to fail||4.7.0

--- Comment #1 from Richard Guenther  2011-04-27 
09:49:15 UTC ---
Confirmed.  -fno-ivopts works around the issue (I didn't yet investigate
whether it causes the issue).


[Bug target/48090] [4.5 Regression] gcc 4.5.2 miscompilation when building on arm

2011-04-27 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48090

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #18 from Ramana Radhakrishnan  
2011-04-27 09:44:05 UTC ---
Fixed.


[Bug target/48604] [4.5/4.6/4.7 regression] wrong code with -frename-registers

2011-04-27 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48604

Eric Botcazou  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||DUPLICATE

--- Comment #5 from Eric Botcazou  2011-04-27 
09:18:29 UTC ---
Indeed.

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


[Bug target/43603] gcc-4.4.3 ICE on ia64 with -O3

2011-04-27 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43603

--- Comment #20 from Andrey Belevantsev  2011-04-27 
10:04:38 UTC ---
Created attachment 24112
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24112
backported patch

Good.  Then attached is the initial backport, I have just verified that it
passes the testcase.  It would be great if the Gentoo folks could test it in
their setup, too.  If all goes well, I will apply it to 4_4-branch at the
beginning of May.


[Bug c/48783] ARM: kernel compiled at -O2 has a unused reference to __aeabi_uldivmod

2011-04-27 Thread michael.hope at linaro dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48783

--- Comment #3 from Michael Hope  2011-04-27 
09:54:56 UTC ---
Created attachment 24111
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24111
Preprocessed source


[Bug target/44618] [4.4/4.5/4.6/4.7 regression] wrong code with -frename-registers

2011-04-27 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44618

Eric Botcazou  changed:

   What|Removed |Added

 CC||dje at gcc dot gnu.org

--- Comment #19 from Eric Botcazou  2011-04-27 
09:35:44 UTC ---
Yes, the problem is in the PowerPC back-end.  And I also think that the use
trick is the way to go.  The mildly annoying thing is the need to duplicate
patterns just because of the different register number, but I'm not sure this
can be avoided.  In any case, this is up to the PowerPC maintainer at this
point.


[Bug target/44618] Arguments are not passed correctly to out-of-line restore functions.

2011-04-27 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44618

Eric Botcazou  changed:

   What|Removed |Added

 CC||sebastian.huber@embedded-br
   ||ains.de

--- Comment #18 from Eric Botcazou  2011-04-27 
09:18:29 UTC ---
*** Bug 48604 has been marked as a duplicate of this bug. ***


[Bug tree-optimization/48772] [4.7 Regression] ICE: SIGSEGV in walk_non_aliased_vuses (gimple.h:1100) with -O -fnon-call-exceptions -fno-tree-ccp -fno-tree-dce

2011-04-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48772

--- Comment #2 from Richard Guenther  2011-04-27 
10:36:38 UTC ---
Author: rguenth
Date: Wed Apr 27 10:36:35 2011
New Revision: 173019

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173019
Log:
2011-04-27  Richard Guenther  

PR tree-optimization/48772
* tree-ssa-pre.c (eliminate): Update call stmts after elimination
only.

* g++.dg/pr48772.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/pr48772.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-pre.c


[Bug tree-optimization/48765] ICE in vect_transform_stmt

2011-04-27 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48765

--- Comment #3 from Ira Rosen  2011-04-27 10:25:16 UTC 
---
As analyzed by Richard, the problem (btw, unrelated to Richard's patch) is that
the vectorization factor is changed after the analysis for this loop, and the
same checks that worked fine during the analysis, now fail during the
transformation.

I'll try to move the vectorization factor calculation before the statements
analysis to avoid this. 

Ira


[Bug tree-optimization/48772] [4.7 Regression] ICE: SIGSEGV in walk_non_aliased_vuses (gimple.h:1100) with -O -fnon-call-exceptions -fno-tree-ccp -fno-tree-dce

2011-04-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48772

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #3 from Richard Guenther  2011-04-27 
10:42:04 UTC ---
Fixed.


[Bug tree-optimization/48775] gcc.dg/pr48616.c FAILs on Tru64 UNIX

2011-04-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48775

--- Comment #1 from Richard Guenther  2011-04-27 
09:50:08 UTC ---
Possibly Tru64 needs similar handling as hppa*-hpux*?


[Bug fortran/48788] New: [4.6/4.7 Regression] ICE: SIGSEGV in resolve_global_procedure (resolve.c:2190) on invalid (?) fortran code

2011-04-27 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48788

   Summary: [4.6/4.7 Regression] ICE: SIGSEGV in
resolve_global_procedure (resolve.c:2190) on invalid
(?) fortran code
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu


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

Compiler output:
$ gfortran testcase.f90
testcase.f90:3.31:

  character(4), external :: foo
   1
Error: Return type mismatch of function 'foo' at (1) (CHARACTER(1)/REAL(4))
==3307== Invalid read of size 8
==3307==at 0x55C8D2: resolve_global_procedure (resolve.c:2190)
==3307==by 0x560A8D: gfc_resolve_expr (resolve.c:3005)
==3307==by 0x5684C9: resolve_code (resolve.c:9028)
==3307==by 0x56A84E: resolve_codes (resolve.c:13614)
==3307==by 0x55C32B: gfc_resolve (resolve.c:13641)
==3307==by 0x5522BA: gfc_parse_file (parse.c:4200)
==3307==by 0x58B175: gfc_be_parse_file (f95-lang.c:250)
==3307==by 0x95E2BB: toplev_main (toplev.c:579)
==3307==by 0x644AB6C: (below main) (in /lib64/libc-2.11.3.so)
==3307==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==3307== 
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Tested revisions:
r172960 - crash
4.6 r172337 - crash
4.5 r172337 - code is accepted


[Bug c/48783] ARM: kernel compiled at -O2 has a unused reference to __aeabi_uldivmod

2011-04-27 Thread ams at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48783

--- Comment #4 from Andrew Stubbs  2011-04-27 11:08:10 
UTC ---
Somewhat reduced testcase:

static void
f (unsigned int a)
{
  unsigned long long __res;
  if (~0ULL % (a / (a & -a)) == 0)
{ 
  asm ("": "+&r" (__res));
}
}

int
g (unsigned int a)
{
  f (a);
}


This gives:

.global __aeabi_uidiv
.global __aeabi_uldivmod
.text
.align  2
.global g
.thumb
.thumb_func
.type   g, %function
g:
.fnstart
.LFB1:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
push{lr}
.save {lr}
ldr pc, [sp], #4
.fnend

So, both __aeabi_uidiv and __aeabi_uldivmod are declared global, but neither is
actually used as the code is optimized away.


[Bug target/48789] missed ARM optimization: use LDMIA

2011-04-27 Thread edwintorok at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48789

--- Comment #3 from Török Edwin  2011-04-27 
11:11:02 UTC ---
Created attachment 24116
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24116
bench.c


[Bug target/43603] gcc-4.4.3 ICE on ia64 with -O3

2011-04-27 Thread devurandom at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43603

--- Comment #21 from devurandom at gmx dot net 2011-04-27 10:56:18 UTC ---
(In reply to comment #20)
> Created attachment 24112 [details]
> backported patch
Thanks! I notified downstream, hopefully they will give it testing through a
bump to gcc-4.4.[56].


[Bug libstdc++/48750] for_each_template_random_access_ed has unbalanced new/delete[]

2011-04-27 Thread bugs at sehe dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48750

--- Comment #14 from Seth Heeren  2011-04-27 09:48:57 UTC 
---
I just built a debian SID chroot and applied the diff to it's libstdc++6
(4.6.0-2), and tested your patch with the minimal.cpp from this bug report

patch -p1 < ~sehe/attachment.cgi?id=24108

patching file parallel/multiway_merge.h
patching file parallel/losertree.h
patching file parallel/par_loop.h
Hunk #1 succeeded at 91 with fuzz 1.
patching file parallel/quicksort.h
patching file parallel/random_shuffle.h
patching file parallel/multiway_mergesort.h
patching file parallel/partial_sum.h

g++-4.6 -g -O0 -fopenmp minimal.cpp  -o minimal -save-temps
valgrind --leak-check=full ./minimal

==5960== LEAK SUMMARY:
==5960==definitely lost: 0 bytes in 0 blocks
==5960==indirectly lost: 0 bytes in 0 blocks
==5960==  possibly lost: 456 bytes in 3 blocks
==5960==still reachable: 1,748 bytes in 3 blocks
==5960== suppressed: 0 bytes in 0 blocks

The allocation possibly lost are attributed to GOMP_parallel_start from
numeric:99). 

Helgrind gives quite the array of possible data races. I don't know whether I
need to worry about them (as I don't know what kind of thread primitives GOMP
uses internally and if helgrind supports them).

If you want I can attach precompiled sources + val/helgrind outputs


[Bug target/48789] missed ARM optimization: use LDMIA

2011-04-27 Thread edwintorok at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48789

--- Comment #2 from Török Edwin  2011-04-27 
11:10:49 UTC ---
Created attachment 24115
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24115
test.S


[Bug target/48789] missed ARM optimization: use LDMIA

2011-04-27 Thread edwintorok at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48789

--- Comment #1 from Török Edwin  2011-04-27 
11:10:35 UTC ---
Created attachment 24114
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24114
reverse.c


[Bug target/48789] New: missed ARM optimization: use LDMIA

2011-04-27 Thread edwintorok at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48789

   Summary: missed ARM optimization: use LDMIA
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: edwinto...@gmail.com
  Host: x86_64-linux-gnu
Target: arm-elf
 Build: x86_64-linux-gnu


The attached testcase compiles to larger and slower code than the
hand-optimized version, although the C code follows closely the structure of
hand-optimized assembly.

To reproduce the missed optimization:
arm-elf-gcc reverse.c -O3 -mcpu=arm946e-s -msoft-float

The reverse_bytes_order_c2 has too many ldr/str instructions, it should use
ldmia/stmia as seen in the hand-optimized version (test.S
reverse_bytes_order2).

Note: without -msoft-float it generates faster code by using VFP instructions,
but my CPU doesn't support them, so I have to turn off floating point
generation.

Attachments:
reverse.c: the testcase
test.S: the hand-optimized version of the reverse_bytes_order_c2, called
reverse_bytes_order2 here (code from CHDK's lib/armutil/)
bench.c: a simple benchmark runner to compare gcc's version with the hand
optimized one

This happens both with 4.6 and 4.5:
$ arm-elf-gcc -v
Using built-in specs.
COLLECT_GCC=../build-dir/arm/toolchain/bin/arm-elf-gcc
COLLECT_LTO_WRAPPER=/home/edwin/chdk/build-dir/arm/toolchain/libexec/gcc/arm-elf/4.6.0/lto-wrapper
Target: arm-elf
Configured with: ../gcc-4.6.0/configure --target=arm-elf
--prefix=/home/edwin/chdk/build-dir/arm/toolchain --enable-interwork
--enable-multilib --enable-languages=c --with-newlib
--with-gmp-include=/home/edwin/chdk/build-dir/build/gmp
--with-gmp-lib=/home/edwin/chdk/build-dir/build/gmp/.libs --without-headers
--disable-libssp --disable-nls --disable-zlib --disable-libc --disable-libm
--disable-intl --disable-hardfloat --disable-threads --with-gnu-as
--with-gnu-ld
Thread model: single
gcc version 4.6.0 (GCC) 

$ /opt/cfarm/release/4.5.0/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/opt/cfarm/release/4.5.0/bin/gcc
COLLECT_LTO_WRAPPER=/home/guerby/opt/release/4.5.0/bin/../libexec/gcc/armv7l-unknown-linux-gnueabi/4.5.0/lto-wrapper
Target: armv7l-unknown-linux-gnueabi
Configured with: ../gcc-4.5.0/configure --prefix=/opt/cfarm/release/4.5.0
--enable-languages=c,ada --enable-__cxa_atexit --disable-nls
--enable-threads=posix --disable-multilib --with-gmp=/opt/cfarm/gmp-4.2.4
--with-mpfr=/opt/cfarm/mpfr-2.4.2 --with-mpc=/opt/cfarm/mpc-0.8
--with-cpu=cortex-a8 --with-fpu=neon --with-float=softfp --disable-werror
Thread model: posix
gcc version 4.5.0 (GCC) 

Some benchmarks (run on gcc33, which would support armv7, but my CPU won't, so
I can only use armv5te):
base: 0.340810 (hand-optimized assembly)
3: 0.840712 (alternate version)
c: 0.379164 (C code, compiled with -O3)
c2: 0.395410 (C code, unrolled 8 times as the hand assembly, compiled with -O3)

(note: run benchmark as ./a.out; ./a.out; ./a.out. I think there is some
frequency scaling causing the first run to be slower)

To run benchmark:
/opt/cfarm/release/4.5.0/bin/gcc bench.c reverse.c test.S -O3  -mcpu=arm946e-s
-msoft-float


[Bug fortran/48788] [4.6/4.7 Regression] ICE: SIGSEGV in resolve_global_procedure (resolve.c:2190) on invalid (?) fortran code

2011-04-27 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48788

Tobias Burnus  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 CC||burnus at gcc dot gnu.org
   Target Milestone|--- |4.6.1

--- Comment #1 from Tobias Burnus  2011-04-27 
11:33:21 UTC ---
2189if (sym->ts.type == BT_CHARACTER && sym->attr.if_source != IFSRC_IFBODY
2190&& def_sym->ts.u.cl->length != NULL)

As def_sym is not BT_CHARACTER, dereferencing def_sym->ts.u.cl fails ...


[Bug c++/45383] [4.5 Regression] Implicit conversion to pointer does no longer automatically generate operator== and operator!=.

2011-04-27 Thread dodji at seketeli dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45383

--- Comment #12 from dodji at seketeli dot org  
2011-04-27 11:37:43 UTC ---
> Dodji, is there any reason not to apply this fix to 4.5 as well?

I was waiting to see how the initial fix would behave in 4.6 and it felt
below my radar.  But then PR c++/46824 hinted for a better fix for this
issue.  So I am backporting the revert of PR c++/42260 and the fix of PR
c++/46824 instead.

I have tested it on x86_64-unknown-linux-gnu aginst 4.5


[Bug c/48790] New: ARM GCC divide/modulo bug

2011-04-27 Thread the.metyl at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48790

   Summary: ARM GCC divide/modulo bug
   Product: gcc
   Version: 4.3.3
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: the.me...@gmail.com


I've found a strange gcc bug in the Sourcery G++ Lite 2009q1-203. Invalid
instruction is generated while executing this code:

len   = 9;
width = 8;

if ((len % width) == 0) 
printf("fail\n");
else 
printf("ok\n");

Strange is that if the code was in main, sometimes it passed throught without
any problems, but when I've put the code into function it always fails to
compute 9 modulo 8. I don’t see anything wrong in assembly generated by gcc
(maybe there is some stack handling problem in the __aeabi_idivmod function)
Any ideas what's wrong with the toolchain's gcc would really help... 

This is how the assembly looks like (of the testcase function)

testcase:
.fnstart
.LFB2:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
stmfd   sp!, {fp, lr}
.save {fp, lr}
.LCFI0:
.setfp fp, sp, #4
add fp, sp, #4
.LCFI1:
.pad #16
sub sp, sp, #16
.LCFI2:
str r0, [fp, #-8]
str r1, [fp, #-12]
ldr r3, [fp, #-8]
mov r0, r3
ldr r1, [fp, #-12]
bl  __aeabi_idivmod
mov r3, r1
cmp r3, #0
bne .L2
ldr r0, .L6
bl  puts
b   .L5
.L2:
ldr r0, .L6+4
bl  puts
.L5:
sub sp, fp, #4
ldmfd   sp!, {fp, pc}
.L7:
.align  2
.L6:
.word   .LC0
.word   .LC1
.LFE2:
.fnend


Full Test example for reproducing the bug (Should write 2 ok into screen, but
it generates Illegal Instruction instead: 

#include 

int testcase(int len, int width)
{
/* This generates Illegal instruction (always) */
if ((len % width) == 0) 
printf("fail\n");
else 
printf("ok\n");
}

int main(int argc, char *argv[])
{
int len, width;

len   = 9;
width = 8;

/* This generates Illegal instruction (sometimes ???) */
if ((len % width) == 0) 
printf("fail\n");
else 
printf("ok\n");


testcase(len, width);

return 0;
}


# arm-none-linux-gnueabi-gcc-4.3.3 --v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with:
/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/src/gcc-4.3/configure
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap
--disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld
--with-specs='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}'
--enable-languages=c,c++ --enable-shared --enable-symvers=gnu
--enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2009q1-203'
--with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls
--prefix=/opt/codesourcery
--with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc
--with-build-sysroot=/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/lite/install/arm-none-linux-gnueabi/libc
--with-gmp=/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/lite/obj/host-libs-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr
--with-mpfr=/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/lite/obj/host-libs-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr
--disable-libgomp --enable-poison-system-directories
--with-build-time-tools=/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/lite/install/arm-none-linux-gnueabi/bin
--with-build-time-tools=/scratch/mitchell/builds/4.3-arm-none-linux-gnueabi-respin/lite/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203)


[Bug c++/42260] [4.3/4.4/4.5 Regression] ICE looking up template conversion operator

2011-04-27 Thread dodji at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42260

--- Comment #6 from Dodji Seketeli  2011-04-27 
12:07:20 UTC ---
Author: dodji
Date: Wed Apr 27 12:07:16 2011
New Revision: 173024

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173024
Log:
Revert "Fix PR c++/42260"

gcc/cp

* cp-tree.h (lookup_conversions): Revert adding new bool
parameter to declaration.
* search.c (lookup_conversions): Revert using new bool parameter
in definition.
* call.c (add_builtin_candidates): Revert "Don't lookup
template conversion".
(convert_class_to_reference, build_user_type_conversion_1)
(build_op_call): Revert Adjustment.
* cvt.c (build_expr_type_conversion): Likewise.

gcc/testsuite

* g++.dg/conversion/cast2.C: Remove file.

Removed:
branches/gcc-4_5-branch/gcc/testsuite/g++.dg/conversion/cast2.C
Modified:
branches/gcc-4_5-branch/gcc/cp/call.c
branches/gcc-4_5-branch/gcc/cp/cp-tree.h
branches/gcc-4_5-branch/gcc/cp/cvt.c
branches/gcc-4_5-branch/gcc/cp/search.c


[Bug c++/45383] [4.5 Regression] Implicit conversion to pointer does no longer automatically generate operator== and operator!=.

2011-04-27 Thread dodji at seketeli dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45383

--- Comment #13 from dodji at seketeli dot org  
2011-04-27 12:32:09 UTC ---
I have committed those in 4.5 and the changes can be browsed at
http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=eb9cc5c6f
and
http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9912b04c


[Bug c/48790] ARM GCC divide/modulo causes Illegal instruction

2011-04-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48790

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #1 from Richard Guenther  2011-04-27 
12:36:48 UTC ---
Please report bugs for custom GCC versions to its vendor, in this case
--with-bugurl=https://support.codesourcery.com/GNUToolchain/


[Bug rtl-optimization/48774] [4.6/4.7 Regression] gcc-4.6.0 optimization regression on x86_64-unknown-linux-gnu

2011-04-27 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48774

H.J. Lu  changed:

   What|Removed |Added

 CC||davidxl at gcc dot gnu.org

--- Comment #2 from H.J. Lu  2011-04-27 12:40:54 
UTC ---
It is caused by revision 162653:

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


[Bug target/48767] compiler error: Segmentation fault with set void in va_arg

2011-04-27 Thread kkojima at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48767

Kazumoto Kojima  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from Kazumoto Kojima  2011-04-27 
12:49:09 UTC ---
Fixed on trunk.


[Bug target/48142] [4.6/4.7 Regression] miscompilation with -Os -mpreferred-stack-boundary=5 -fstack-check

2011-04-27 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48142

Eric Botcazou  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #10 from Eric Botcazou  2011-04-27 
13:09:44 UTC ---
> OK, I have reverted it (I don't have ADA installed, and didn't notice g++
> failure...).

Thanks.


[Bug libstdc++/48760] [4.6 / 4.7 Regression] std::complex constructor buggy in the face of NaN's

2011-04-27 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48760

--- Comment #22 from Jason Merrill  2011-04-27 
13:08:48 UTC ---
(In reply to comment #21)
> PS: C++1x is private jargon, but well, as -std= argument, together with c++0x
> we'll need something more realistic, at some point, don't you think? ;)

At some point, yes: after the standard is ratified, at which point we won't
need an 'x'.  :)


[Bug c++/45383] [4.5 Regression] Implicit conversion to pointer does no longer automatically generate operator== and operator!=.

2011-04-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45383

--- Comment #14 from Richard Guenther  2011-04-27 
13:09:47 UTC ---
*sigh*, 2nd commit while the 4.5 branch is frozen ...


[Bug target/48723] ICE in ix86_expand_prologue() with -fstack-check + function returning struct, on corei7-avx

2011-04-27 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48723

Eric Botcazou  changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED
 AssignedTo|unassigned at gcc dot   |ebotcazou at gcc dot
   |gnu.org |gnu.org

--- Comment #11 from Eric Botcazou  2011-04-27 
13:12:17 UTC ---
Fixing.  I'd suggest CCing me for anything related to -fstack-check.


[Bug target/48628] ICE in reload

2011-04-27 Thread rearnsha at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48628

Richard Earnshaw  changed:

   What|Removed |Added

 Status|WAITING |NEW


[Bug libstdc++/48760] [4.6 / 4.7 Regression] std::complex constructor buggy in the face of NaN's

2011-04-27 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48760

--- Comment #23 from Paolo Carlini  2011-04-27 
13:27:50 UTC ---
Got it ;)


[Bug middle-end/48791] New: [4.7 Regression] Many testcase failures

2011-04-27 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48791

   Summary: [4.7 Regression] Many testcase failures
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com


On Linux/ia32, revision 173027 gave

FAIL: g++.dg/torture/covariant-1.C  -O2  (internal compiler error)
FAIL: g++.dg/torture/covariant-1.C  -O2  (test for excess errors)
FAIL: g++.dg/torture/covariant-1.C  -O2 -flto  (internal compiler error)
FAIL: g++.dg/torture/covariant-1.C  -O2 -flto  (test for excess errors)
FAIL: g++.dg/torture/covariant-1.C  -O2 -flto -flto-partition=none  (internal
compiler error)
FAIL: g++.dg/torture/covariant-1.C  -O2 -flto -flto-partition=none  (test for
excess errors)
FAIL: g++.dg/torture/covariant-1.C  -O3 -fomit-frame-pointer  (internal
compiler error)
FAIL: g++.dg/torture/covariant-1.C  -O3 -fomit-frame-pointer  (test for excess
errors)
FAIL: g++.dg/torture/covariant-1.C  -O3 -g  (internal compiler error)
FAIL: g++.dg/torture/covariant-1.C  -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/covariant-1.C  -Os  (internal compiler error)
FAIL: g++.dg/torture/covariant-1.C  -Os  (test for excess errors)
FAIL: g++.dg/torture/pr43068.C  -O2  (internal compiler error)
FAIL: g++.dg/torture/pr43068.C  -O2  (test for excess errors)
FAIL: g++.dg/torture/pr43068.C  -O2 -flto  (internal compiler error)
FAIL: g++.dg/torture/pr43068.C  -O2 -flto  (test for excess errors)
FAIL: g++.dg/torture/pr43068.C  -O2 -flto -flto-partition=none  (internal
compiler error)
FAIL: g++.dg/torture/pr43068.C  -O2 -flto -flto-partition=none  (test for
excess errors)
FAIL: g++.dg/torture/pr43068.C  -O3 -fomit-frame-pointer  (internal compiler
error)
FAIL: g++.dg/torture/pr43068.C  -O3 -fomit-frame-pointer  (test for excess
errors)
FAIL: g++.dg/torture/pr43068.C  -O3 -g  (internal compiler error)
FAIL: g++.dg/torture/pr43068.C  -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr43068.C  -Os  (internal compiler error)
FAIL: g++.dg/torture/pr43068.C  -Os  (test for excess errors)
FAIL: g++.dg/torture/pr47714.C  -O2  (internal compiler error)
FAIL: g++.dg/torture/pr47714.C  -O2  (test for excess errors)
FAIL: g++.dg/torture/pr47714.C  -O2 -flto  (internal compiler error)
FAIL: g++.dg/torture/pr47714.C  -O2 -flto  (test for excess errors)
FAIL: g++.dg/torture/pr47714.C  -O2 -flto -flto-partition=none  (internal
compiler error)
FAIL: g++.dg/torture/pr47714.C  -O2 -flto -flto-partition=none  (test for
excess errors)
FAIL: g++.dg/torture/pr47714.C  -O3 -fomit-frame-pointer  (internal compiler
error)
FAIL: g++.dg/torture/pr47714.C  -O3 -fomit-frame-pointer  (test for excess
errors)
FAIL: g++.dg/torture/pr47714.C  -O3 -g  (internal compiler error)
FAIL: g++.dg/torture/pr47714.C  -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr47714.C  -Os  (internal compiler error)
FAIL: g++.dg/torture/pr47714.C  -Os  (test for excess errors)
FAIL: g++.dg/tree-ssa/pr34355.C (internal compiler error)
FAIL: g++.dg/tree-ssa/pr34355.C (test for excess errors)
FAIL: gcc.dg/autopar/outer-1.c (internal compiler error)
FAIL: gcc.dg/autopar/outer-1.c (test for excess errors)
FAIL: gcc.dg/autopar/outer-2.c (internal compiler error)
FAIL: gcc.dg/autopar/outer-2.c (test for excess errors)
FAIL: gcc.dg/autopar/outer-3.c (internal compiler error)
FAIL: gcc.dg/autopar/outer-3.c (test for excess errors)
FAIL: gcc.dg/autopar/outer-4.c (internal compiler error)
FAIL: gcc.dg/autopar/outer-4.c (test for excess errors)
FAIL: gcc.dg/autopar/outer-5.c (internal compiler error)
FAIL: gcc.dg/autopar/outer-5.c (test for excess errors)
FAIL: gcc.dg/autopar/outer-6.c (internal compiler error)
FAIL: gcc.dg/autopar/outer-6.c (test for excess errors)
FAIL: gcc.dg/autopar/parallelization-1.c (internal compiler error)
FAIL: gcc.dg/autopar/parallelization-1.c (test for excess errors)
FAIL: gcc.dg/autopar/pr39500-1.c (internal compiler error)
FAIL: gcc.dg/autopar/pr39500-1.c (test for excess errors)
FAIL: gcc.dg/autopar/pr46561.c (internal compiler error)
FAIL: gcc.dg/autopar/pr46561.c (test for excess errors)
FAIL: gcc.dg/autopar/pr46969.c (internal compiler error)
FAIL: gcc.dg/autopar/pr46969.c (test for excess errors)
FAIL: gcc.dg/autopar/reduc-1.c (internal compiler error)
FAIL: gcc.dg/autopar/reduc-1.c (test for excess errors)
FAIL: gcc.dg/autopar/reduc-1char.c (internal compiler error)
FAIL: gcc.dg/autopar/reduc-1char.c (test for excess errors)
FAIL: gcc.dg/autopar/reduc-1short.c (internal compiler error)
FAIL: gcc.dg/autopar/reduc-1short.c (test for excess errors)
FAIL: gcc.dg/autopar/reduc-2.c (internal compiler error)
FAIL: gcc.dg/autopar/reduc-2.c (test for excess errors)
FAIL: gcc.dg/autopar/reduc-2char.c (internal compiler error)
FAIL: gcc.dg/autopar/reduc-2char.c (test for excess errors)
FAIL: gcc.dg/autopar/reduc-2short.c (internal compiler error)
FAIL: gcc.dg/autopar/reduc-2short.c (test

[Bug libfortran/48511] Implement Steele-White algorithm for numeric output

2011-04-27 Thread thenlich at users dot sourceforge.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48511

--- Comment #7 from Thomas Henlich  
2011-04-27 14:11:10 UTC ---
Gay's routines (http://www.netlib.org/fp/) can handle double, float, extended,
quad; rounding directions may be specified. They can output a given number of
digits (compatible to all Fortran formats where this is required), thus
mimicking the "regular" printf behaviour; or find the shortest number of digits
that round-trip to the same value (good for G0 editing). This should be worth a
try.


[Bug middle-end/48791] [4.7 Regression] Many testcase failures

2011-04-27 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48791

H.J. Lu  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #1 from H.J. Lu  2011-04-27 14:06:48 
UTC ---
It may be caused by 173026:

http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg01222.html


[Bug fortran/48786] [4.6/4.7 Regression][OOP] Generic ambiguity check too strict for polymorphic dummies

2011-04-27 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48786

Tobias Burnus  changed:

   What|Removed |Added

  Known to work||4.5.3
   Target Milestone|--- |4.6.1
Summary|[OOP] Generic ambiguity |[4.6/4.7 Regression][OOP]
   |check too strict for|Generic ambiguity check too
   |polymorphic dummies |strict for polymorphic
   ||dummies
  Known to fail||4.6.0, 4.7.0

--- Comment #1 from Tobias Burnus  2011-04-27 
13:55:00 UTC ---
It's a regression; with GCC 4.5.3 20110421 one gets the correct error:

point = point + vector
1
Error: Variable must not be polymorphic in assignment at (1)


While 4.6.1 20110422 and 4.7 regard 'add_vector_3d' and 'add_vector_2d' as
ambiguous. (Thus, the above diagnostic will not be reached.)


[Bug middle-end/48791] [4.7 Regression] Many testcase failures

2011-04-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48791

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.04.27 14:36:26
   Target Milestone|--- |4.7.0
 Ever Confirmed|0   |1

--- Comment #2 from Richard Guenther  2011-04-27 
14:36:26 UTC ---
#1  0x010e02e0 in ipa_analyze_params_uses (node=0x75b90940, 
parms_info=0x7fffd4d0)
at /space/rguenther/src/svn/trunk/gcc/ipa-prop.c:1528
1528  if (is_gimple_reg (parm)
(gdb) l
1523  for (i = 0; i < ipa_get_param_count (info); i++)
1524{
1525  tree parm = ipa_get_param (info, i);
1526  /* For SSA regs see if parameter is used.  For non-SSA we compute
1527 the flag during modification analysis.  */
1528  if (is_gimple_reg (parm)
1529  && gimple_default_def (DECL_STRUCT_FUNCTION (node->decl),
parm))
1530info->params[i].used = true;
1531}
1532
(gdb) p cfun
$1 = (struct function *) 0x0


[Bug middle-end/48791] [4.7 Regression] Many testcase failures

2011-04-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48791

--- Comment #3 from Richard Guenther  2011-04-27 
14:38:01 UTC ---
DECL_STRUCT_FUNCTION (node->decl) is NULL for covariant return thunk to
AB::getThis()


[Bug middle-end/48791] [4.7 Regression] Many testcase failures

2011-04-27 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48791

--- Comment #4 from Richard Guenther  2011-04-27 
14:41:15 UTC ---
#3  0x010e2203 in ipa_add_new_function (node=0x75b90940, data=0x0)
at /space/rguenther/src/svn/trunk/gcc/ipa-prop.c:2068
2068  ipa_analyze_node (node);
(gdb) call debug_cgraph_node (node)
AB* AB::_ZTch0_h8_N2AB7getThisEv()/4 @0x75b90940 (asm:
_ZTch0_h8_N2AB7getThisEv) availability:not_available needed reachable finalized
asm_written
  called by: 
  calls: 
  References: 
  Refering this function:


[Bug libfortran/48511] Implement Steele-White algorithm for numeric output

2011-04-27 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48511

--- Comment #8 from Tobias Burnus  2011-04-27 
14:59:39 UTC ---
(In reply to comment #7)
> Gay's routines (http://www.netlib.org/fp/) can handle double, float, extended,
> quad

libquadmath initially used dtoa for __float128 [REAL(16)] I/O, but there were
several issues especially with NaN; thus, one now uses functions based on
GLIBC. (At least the code I saw in libquadmath/gdtoa was also a mess, maybe
using "dtoa.c" itself is better.)

In any case, one could think of using Fortran tailored I/O functions instead of
using the C ones; and Gay's routines might be a starting point. (Interestingly,
the netlib files are still maintained, the last changelog entry is from
2011-03-21!)


[Bug fortran/48746] [4.6/4.7 Regression] Matmul with allocate on assignment

2011-04-27 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48746

Thomas Koenig  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.04.27 14:58:54
 Ever Confirmed|0   |1

--- Comment #3 from Thomas Koenig  2011-04-27 
14:58:54 UTC ---
(In reply to comment #1)
> Problem here is that the return array "dtype" field is uninitialized when
> lhs is (unallocated) allocatable. Due to this there are also similiar
> problems in other intrinsics such as reshape(), etc...

Interesting observation.  This works:

program main
  implicit none
  integer, parameter :: m=10, n=12, count=4
  double precision :: a(m, count), b(count, n), c(m, n)
  double precision, dimension(:,:), allocatable :: tmp

  call random_number(a)
  call random_number(b)
  allocate (tmp(3,3))
  deallocate(tmp)
  tmp = matmul(a,b)
end program main


[Bug fortran/48746] [4.6/4.7 Regression] Matmul with allocate on assignment

2011-04-27 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48746

--- Comment #4 from Thomas Koenig  2011-04-27 
15:07:21 UTC ---
(In reply to comment #3)
> (In reply to comment #1)
> > Problem here is that the return array "dtype" field is uninitialized when
> > lhs is (unallocated) allocatable. Due to this there are also similiar
> > problems in other intrinsics such as reshape(), etc...
> 
> Interesting observation.  This works:

... well, for a given value of "works".  tmp keeps its size of 3*3.


[Bug middle-end/48752] [4.7 Regression] ICE in evaulate_conditions_for_edge at ipa-inline-analysis.c:466

2011-04-27 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48752

--- Comment #14 from dave at hiauly1 dot hia.nrc.ca 2011-04-27 15:20:32 UTC ---
> I still can't reproduce the testcase but I guess I can make one myself just by
> forcing global constructor.  Will try to have patch before lunch.

I realized last night that I could probably find a simpler testcase
by running the C testsuite.

Dave


[Bug target/48792] New: ICE in failed_reload, at reload1.c:6000

2011-04-27 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48792

   Summary: ICE in failed_reload, at reload1.c:6000
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rmansfi...@qnx.com
  Host: i686-linux-gnu
Target: arm-unknown-linux-gnueabi
 Build: i686-linux-gnu


Created attachment 24117
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24117
preprocessed source

./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: arm-unknown-linux-gnueabi
Configured with: ../configure --target=arm-unknown-linux-gnueabi
--prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi
--with-sysroot=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root
--disable-multilib
--with-local-prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99
--enable-long-long --enable-target-optspace
target_alias=arm-unknown-linux-gnueabi --enable-languages=c++ --disable-shared
--disable-libmudflap --disable-libssp
Thread model: posix
gcc version 4.7.0 20110427 (experimental) [trunk revision 173031] (GCC) 

$ ./xgcc -B.  -c  -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16  -O2 t.ii
t.ii: In member function 'void
icu_46::ValueRecord::adjustPosition(icu_46::ValueFormat, const char*,
icu_46::GlyphIterator&, const icu_46::LEFontInstance*) const':
t.ii:62:7: error: could not find a spill register
(insn 21 24 25 3 (set (subreg:SI (reg:HI 160) 0)
(fix:SI (fix:SF (reg:SF 0 r0 t.ii:48 665 {*truncsisf2_vfp}
 (expr_list:REG_DEAD (reg:SF 0 r0)
(nil)))
t.ii:62:7: internal compiler error: in failed_reload, at reload1.c:6000
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


[Bug c++/48046] [4.5/4.6/4.7 Regression] Expected diagnostic "reference to 'type' is ambiguous" not given for function-local static declaration

2011-04-27 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48046

--- Comment #4 from Jason Merrill  2011-04-27 
15:56:50 UTC ---
Author: jason
Date: Wed Apr 27 15:56:46 2011
New Revision: 173036

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173036
Log:
PR c++/48046
* parser.c (cp_parser_diagnose_invalid_type_name): Commit
to tentative parse sooner.

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


[Bug c++/48046] [4.5/4.6/4.7 Regression] Expected diagnostic "reference to 'type' is ambiguous" not given for function-local static declaration

2011-04-27 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48046

--- Comment #5 from Jason Merrill  2011-04-27 
15:57:11 UTC ---
Author: jason
Date: Wed Apr 27 15:57:06 2011
New Revision: 173038

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173038
Log:
PR c++/48046
* parser.c (cp_parser_diagnose_invalid_type_name): Commit
to tentative parse sooner.

Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/parse/ambig6.C
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/parser.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


[Bug c++/48046] [4.5 Regression] Expected diagnostic "reference to 'type' is ambiguous" not given for function-local static declaration

2011-04-27 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48046

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |
Summary|[4.5/4.6/4.7 Regression]|[4.5 Regression] Expected
   |Expected diagnostic |diagnostic "reference to
   |"reference to  'type' is|'type' is ambiguous" not
   |ambiguous" not given for|given for function-local
   |function-local static   |static declaration
   |declaration |

--- Comment #6 from Jason Merrill  2011-04-27 
15:58:07 UTC ---
Fixed in 4.6/4.7.  Waiting for 4.5 to unfreeze before applying there.


[Bug c++/48046] [4.5 Regression] Expected diagnostic "reference to 'type' is ambiguous" not given for function-local static declaration

2011-04-27 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48046

--- Comment #7 from Paolo Carlini  2011-04-27 
15:59:01 UTC ---
Thanks Jason.


[Bug java/48417] -ffixed-regs option can't work in mips-elf-gcj compiler

2011-04-27 Thread licheng.1212 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48417

--- Comment #3 from licheng.1212 at gmail dot com  2011-04-27 16:03:56 UTC ---
GCJjava_main.java
Using built-in specs.
Target: mips-elf
Configured with: ../gcc-4.4.2/configure --prefix=/home/lee/gnu_src/dist
--target=mips-elf --with-newlib
--with-headers=../newlib-1.18.0/newlib/libc/include/
--with-ar=/home/lee/gnu_src/dist/bin/mips-elf-ar
--with-as=/home/lee/gnu_src/dist/bin/mips-elf-as
--with-ld=/home/lee/gnu_src/dist/bin/mips-elf-ld
--with-mpfr=/home/lee/gnu_src/dist --with-gmp=/home/lee/gnu_src/dist
--with-ppl=/home/lee/gnu_src/dist --with-cloog=/home/lee/gnu_src/dist
--enable-languages=c,c++,java --disable-multilib --enable-libgcj
--disable-threads --disable-interpreter --disable-libgcj-bc
--enable-reduced-reflection --with-system-zlib
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--enable-static --disable-getenv-properties --disable-libunwind-exceptions
--enable-sjlj-exceptions --disable-java-awt --disable-dssi --disable-bootstrap
--disable-plugin --disable-shared --without-x --enable-java-gc=boehm
--without-libffi --disable-jvmpi --disable-tls --disable-java-net
--with-gcc-version-trigger=../gcc-4.4.2/gcc/version.c --disable-libstdcxx-pch
--with-bugurl='In case of bug, please contact Coolsand Technologies.'
Thread model: single
gcc version 4.4.2 (Coolsand Version 1 - In test.) (GCC) 
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-C' '-v' '-fencoding=UTF-8'
'-Wno-deprecated' '-freduced-reflection' '-Wshadow' '-O2' '-g'
'-falign-functions=16' '-falign-jumps=16' '-msoft-float' '-Wunused-function'
'-Wunused' '-Wunused-variable' '-Wuninitialized' '-minterlink-mips16'
'-fno-strict-aliasing' '-ffunction-sections' '-fdata-sections'
'-fno-builtin-iswspace' '-ffixed-t3' '-ffixed-t4' '-ffixed-t5' '-ffixed-t6'
'-ffixed-t7' '-ffixed-s2' '-ffixed-s3' '-ffixed-s4' '-ffixed-s5' '-ffixed-s6'
'-ffixed-s7' '-ffixed-fp' '-G0' '-Wall' '-march=xcpu' '-mtune=xcpu' '-EL'
'-mexplicit-relocs' '-fweb' '-frename-registers' '-mmemcpy' '-mmips-tfile'
'-nostartfiles' '-nostdlib' '-nostdinc' '-nodefaultlibs' '-c' '-pipe' '-static'
'-fwide-exec-charset=UTF-16LE' '-fshort-wchar' '-mips16'
'-fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar'
'-fsyntax-only' '-femit-class-files' '-S' '-o' 'NONE'
 /home/lee/csdtk/new_dtk_j2me/bin/../libexec/gcc/mips-elf/4.4.2/ecj1
src/java_main.java -Wno-deprecated -Wshadow -Wunused-function -Wunused
-Wunused-variable -Wuninitialized -Wall -g
-fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//qq2008.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ2010_Java_Final_Build0332_Unsigned.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//smallistQQ/:/home/lee/csdtk/new_dtk_j2me/bin/../lib/gcc/../../share/java/libgcj-4.4.2.jar
-fencoding=UTF-8 -g -fsource=1.5 -ftarget=1.5 -fzip-dependency
/tmp/cc7MD3YG.zip
src/java_main.java:2: warning: The import java.io.IOException is never used
import java.io.IOException;
   ^^^
src/java_main.java:15: warning: The field java_main.tmp is never read locally
private MainMIDlet tmp;
   ^^^
2 problems (2 warnings)
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-C' '-v' '-fencoding=UTF-8'
'-Wno-deprecated' '-freduced-reflection' '-Wshadow' '-O2' '-g'
'-falign-functions=16' '-falign-jumps=16' '-msoft-float' '-Wunused-function'
'-Wunused' '-Wunused-variable' '-Wuninitialized' '-minterlink-mips16'
'-fno-strict-aliasing' '-ffunction-sections' '-fdata-sections'
'-fno-builtin-iswspace' '-ffixed-t3' '-ffixed-t4' '-ffixed-t5' '-ffixed-t6'
'-ffixed-t7' '-ffixed-s2' '-ffixed-s3' '-ffixed-s4' '-ffixed-s5' '-ffixed-s6'
'-ffixed-s7' '-ffixed-fp' '-G0' '-Wall' '-march=xcpu' '-mtune=xcpu' '-EL'
'-mexplicit-relocs' '-fweb' '-frename-registers' '-mmemcpy' '-mmips-tfile'
'-nostartfiles' '-nostdlib' '-nostdinc' '-nodefaultlibs' '-c' '-pipe' '-static'
'-fwide-exec-charset=UTF-16LE' '-fshort-wchar' '-mips16'
'-fbootclasspath=/home/lee/projects/g800_qq/soft/env/include/libj2me.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//LTRUNNER.jar:/home/lee/projects/g800_qq/soft/application/adaptation/java/src//QQ4.0Build05.04.01.jar:/home/lee/projects/g800_qq/soft

[Bug middle-end/48752] [4.7 Regression] ICE in evaulate_conditions_for_edge at ipa-inline-analysis.c:466

2011-04-27 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48752

--- Comment #15 from Jan Hubicka  2011-04-27 16:04:21 
UTC ---
Hi,
I hope the problem is now fixed at mainline tree.  Could you please give it a
try?
Thanks,
Honza


[Bug middle-end/43085] Make profiledbootstrap fails with cc1plus catching SIGSEGV

2011-04-27 Thread uweigand at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43085

Ulrich Weigand  changed:

   What|Removed |Added

 CC||uweigand at gcc dot gnu.org
  Component|c++ |middle-end

--- Comment #22 from Ulrich Weigand  2011-04-27 
16:14:49 UTC ---
I've confirmed the problem with the current 4.5 branch.  Note that the problem
disappears when building with --enable-checking.

A minimal testcase showing the internal compiler error in cc1plus when built
with profile-directed feedback:

class __pool_alloc_base
{
  void _M_round_up () { }
  void _M_get_free_list () { }
  void _M_get_mutex () { }
  void _M_refill () { }
  void _M_allocate_chunk () { }
};

template  class __pool_alloc : __pool_alloc_base
{
  __pool_alloc () { }
  ~__pool_alloc () { }
};

template class __pool_alloc;

The crash occurs because build_new_method_call is unable to find the base_ctor
method in the __pool_alloc_base class, and then crashes when accessing a NULL
method pointer.  The pointer is not checked for NULL as that routine must be
there since it was added by the compiler itself automatically.

However, due to a mis-compilation of the add_method routine, the method vector
data structure was not actually updated.  The code in add_method does:

  bool reallocated;

  /* We only expect to add few methods in the COMPLETE_P case, so
 just make room for one more method in that case.  */
  if (complete_p)
reallocated = VEC_reserve_exact (tree, gc, method_vec, 1);
  else
reallocated = VEC_reserve (tree, gc, method_vec, 1);
  if (reallocated)
CLASSTYPE_METHOD_VEC (type) = method_vec;
  if (slot == VEC_length (tree, method_vec))
VEC_quick_push (tree, method_vec, overload);
  else
VEC_quick_insert (tree, method_vec, slot, overload);

But due to the mis-compile, the 
  CLASSTYPE_METHOD_VEC (type) = method_vec;
line is not executed in this particular case, even though "reallocated" is set.

The vec.h header file routines inlined into add_method here are as follows:

static inline int VEC_OP (T,base,space)   \
 (VEC(T,base) *vec_, int alloc_ VEC_CHECK_DECL)   \
{ \
  VEC_ASSERT (alloc_ >= 0, "space", T, base); \
  return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_;\
} \

static inline int VEC_OP (T,A,reserve)\
 (VEC(T,A) **vec_, int alloc_ VEC_CHECK_DECL MEM_STAT_DECL)   \
{ \
  int extend = !VEC_OP (T,base,space) (VEC_BASE(*vec_), alloc_\
   VEC_CHECK_PASS);   \
  \
  if (extend) \
*vec_ = (VEC(T,A) *) vec_##A##_p_reserve (*vec_, alloc_ PASS_MEM_STAT); \
  \
  return extend;  \
} \

static inline int VEC_OP (T,A,reserve_exact)  \
 (VEC(T,A) **vec_, int alloc_ VEC_CHECK_DECL MEM_STAT_DECL)   \
{ \
  int extend = !VEC_OP (T,base,space) (VEC_BASE(*vec_), alloc_\
   VEC_CHECK_PASS);   \
  \
  if (extend) \
*vec_ = (VEC(T,A) *) vec_##A##_p_reserve_exact (*vec_, alloc_ \
PASS_MEM_STAT);   \
  \
  return extend;  \
} \

and the mis-compile happens when computing the "space" predicate.  Due to the
particular circumstances, the effect is that the "reserve_exact" routine is
actually called, but nevertheless in effect "false" is returned to the caller
of the inlined routine.

In the generated assembler code, the effect can be seen most easily by
comparing the code for 
reallocated = VEC_reserve_exact (tree, gc, method_vec, 1);
with the one generated for
reallocated = VEC_reserve (tree, gc, method_vec, 1);

In the latter case, we get the following snippet for computing "space":

 82ec7de:   85 db  

[Bug middle-end/48791] [4.7 Regression] Many testcase failures

2011-04-27 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48791

Jan Hubicka  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #5 from Jan Hubicka  2011-04-27 
16:21:38 UTC ---
Fixed by my patch to cgraphunit.c


[Bug middle-end/43085] Make profiledbootstrap fails with cc1plus catching SIGSEGV

2011-04-27 Thread uweigand at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43085

--- Comment #23 from Ulrich Weigand  2011-04-27 
16:28:32 UTC ---
Patch posted here:
http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02131.html


[Bug c++/40975] [4.3/4.4/4.5/4.6/4.7 Regression] ICE in copy_tree_r on array new

2011-04-27 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975

Jason Merrill  changed:

   What|Removed |Added

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


[Bug c/48793] New: Optimization -O2 Incorrectly Removes Logic

2011-04-27 Thread chris at durso dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48793

   Summary: Optimization -O2 Incorrectly Removes Logic
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ch...@durso.org


Created attachment 24118
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24118
main.ii

When dealing with min_int (0x8000, a peculiar value as min_int < 0 &&
min_int == -1*min_int) it appears that -O2 and above on on some versions of gcc
will under some circumstances optimize away particular logic for dealing with
this edge case.

Of the versions I've tested:

gcc version 4.1.2 20080704 (Red Hat 4.1.2-48) SUCCESSFUL
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3) FAILS
gcc version 4.4.3 (GCC) Target: i386-pc-solaris2.10 FAILS


FAILURE EXAMPLE:

chdurso@searchdev12:m_index_query_hash_core> uname -a ;
/ebay/vendor/pkg/gcc-4.4.3/bin/g++ -v; /ebay/vendor/pkg/gcc-4.4.3/bin/g++ -Wall
-Wextra -save-temps -O2 -o hello main.cpp ; echo START_OUTPUT; ./hello
SunOS searchdev12.arch.ebay.com 5.10 Generic_120012-14 i86pc i386 i86pc Solaris
Using built-in specs.
Target: i386-pc-solaris2.10
Configured with: /ebay/vendor/Archive/gcc-4.4.3/configure
--prefix=/ebay/vendor/pkg/gcc-4.4.3 --with-gnu-as --with-as=/usr/sfw/bin/gas
--without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-shared
--enable-languages=c,c++
Thread model: posix
gcc version 4.4.3 (GCC) 
START_OUTPUT
The following number is tricky as it is the only negative number unpaired with
a positive analog in 2's compliment arithemetic.  It behaves unintuitively and
apparently breaks an optimization.

tricky: -2147483648

abs(tricky): -2147483648
 1 * tricky = -2147483648
-1 * tricky = -2147483648
tricky + 1 = -2147483647
tricky - 1 = 2147483647
test 0: tricky: -2147483648
test 1: tricky: -2147483648
Assertion failed: tricky == 0x7fff && "on -O2 and above this asserts
apparently drops last if statement", file main.cpp, line 35
Abort (core dumped)

// main.cpp
//

#include 
#include 
#include 
using namespace std;


int main(int , const char**){

  cout <<  "The following number is tricky as it is the only negative number "
"unpaired with a positive analog in 2's compliment arithemetic.  "  
   "It behaves unintuitively and apparently breaks an optimization."<< endl
<< endl;

  int tricky = 0x8000;
  cout << "tricky: " << tricky << endl << endl;
  cout << "abs(tricky): "  << abs(tricky) << endl 
   << " 1 * tricky = " << 1* tricky   << endl
   << "-1 * tricky = " << -1* tricky  << endl
   << "tricky + 1 = "  <<  tricky + 1  << endl
   << "tricky - 1 = "  <<  tricky - 1  << endl;

  tricky = 0x1;
  for(int i(0); i < 31; ++i) // can't simply assign, but a loop here will
result allow failure
tricky <<=  1;

  assert(tricky == int(0x8000));
  // tricky = 0x8000; this unnecessary assignment will cause it work
correctly
  cout << "test 0: tricky: " << tricky << endl;
  if (tricky<0) tricky = -tricky;   // should always get here
  cout << "test 1: tricky: " << tricky << endl;
  if (tricky < 0) tricky = 0x7fff;  // should always get here

  assert(tricky == 0x7fff && "on -O2 and above this asserts apparently
drops last if statement");

  return 0;
}

ATTACHED main.ii


[Bug tree-optimization/40052] missed optimizations on (extended) logical types: (x | 1) --> 1

2011-04-27 Thread matt at use dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40052

Matt Hargett  changed:

   What|Removed |Added

 CC||matt at use dot net

--- Comment #3 from Matt Hargett  2011-04-27 17:47:48 UTC 
---
I just tested this with 4.6.0 and all of the below cases appear to fold
correctly at -O2. Can this be marked as resolved?


[Bug tree-optimization/15347] [tree-ssa] fold if ("<12ers" + 1 == 0).

2011-04-27 Thread matt at use dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15347

Matt Hargett  changed:

   What|Removed |Added

 CC||matt at use dot net

--- Comment #9 from Matt Hargett  2011-04-27 17:52:06 UTC 
---
This appears to be fixed in 4.6.0. Mark as resolved?


[Bug tree-optimization/37242] missed FRE opportunity because of signedness of addition

2011-04-27 Thread matt at use dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37242

Matt Hargett  changed:

   What|Removed |Added

 CC||matt at use dot net

--- Comment #19 from Matt Hargett  2011-04-27 17:57:34 UTC 
---
This appears to be fixed in 4.6.0. Mark as resolved?


[Bug tree-optimization/39689] IPA should compute if a function may recurse

2011-04-27 Thread matt at use dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39689

Matt Hargett  changed:

   What|Removed |Added

 CC||matt at use dot net

--- Comment #8 from Matt Hargett  2011-04-27 17:59:59 UTC 
---
Are there specific cases that might not work in 4.6.0? If so, add them here and
I'll test it. If not, can this be marked as resolved?


[Bug c/48793] Optimization -O2 Incorrectly Removes Logic

2011-04-27 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48793

Andreas Schwab  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #1 from Andreas Schwab  2011-04-27 18:30:18 
UTC ---
Signed integer overflow is undefined.  Use unsigned int or -fwrapv to enable
wrapping semantics.


[Bug tree-optimization/15347] [tree-ssa] fold if ("<12ers" + 1 == 0).

2011-04-27 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15347

--- Comment #10 from H.J. Lu  2011-04-27 18:32:34 
UTC ---
(In reply to comment #9)
> This appears to be fixed in 4.6.0. Mark as resolved?

Need to add a few testcases first.


[Bug middle-end/48794] New: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop

2011-04-27 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48794

   Summary: [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr
(tree-inline.c:1194) with -Os -fopenmp -fexceptions
-fno-tree-ccp -fno-tree-copy-prop
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz
CC: ja...@gcc.gnu.org
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu


Created attachment 24119
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24119
auto-reduced testcase (from libgomp.fortran/allocatable3.f90)

This is very similiar ro PR48611.

Compiler output:
$ gcc -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop testcase.f90
==32088== Invalid read of size 4
==32088==at 0xBCFC1F: remap_eh_region_nr.isra.74 (tree-inline.c:1194)
==32088==by 0xBD3A89: remap_gimple_stmt (tree-inline.c:1444)
==32088==by 0xBD4477: copy_bb (tree-inline.c:1540)
==32088==by 0xBD5654: copy_body (tree-inline.c:2244)
==32088==by 0xBD7D8E: expand_call_inline (tree-inline.c:3906)
==32088==by 0xBDA2BF: optimize_inline_calls (tree-inline.c:4018)
==32088==by 0xBB3B06: inline_transform (ipa-inline-transform.c:313)
==32088==by 0x872E30: execute_all_ipa_transforms (passes.c:1455)
==32088==by 0x9BBCA1: tree_rest_of_compilation (tree-optimize.c:416)
==32088==by 0xB9F1B2: cgraph_expand_function (cgraphunit.c:1578)
==32088==by 0xBA16CB: cgraph_optimize (cgraphunit.c:1637)
==32088==by 0xBA1C59: cgraph_finalize_compilation_unit (cgraphunit.c:1098)
==32088==by 0x82A75C: write_global_declarations (langhooks.c:303)
==32088==by 0x95FCC7: toplev_main (toplev.c:591)
==32088==by 0x644AB6C: (below main) (in /lib64/libc-2.11.3.so)
==32088==  Address 0x18 is not stack'd, malloc'd or (recently) free'd
==32088== 
testcase.f90: In function 'main':
testcase.f90:8:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Tested revisions:
r173040 - crash
4.6 r172337 - OK


[Bug libfortran/48511] Implement Steele-White algorithm for numeric output

2011-04-27 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48511

--- Comment #9 from Janne Blomqvist  2011-04-27 18:36:12 
UTC ---
I've been thinking about this issue now and then over the past few weeks, and
funnily enough, while I initially thought this would be a nice improvement,
I've subsequently come to the opposite conclusion, namely that this shouldn't
be done:

- The use case is limited to making G0, and potentially list formatted, output
more compact in some cases. So the benefit isn't that big, IMHO.

- Even if we can start off with David Gay's code instead of reimplementing from
scratch, it means importing and maintaining potentially several thousand lines
of very tricky code.

- Getting something wrong may not only mean that we get some conversion wrong
in the last bit, but as can be seen in the recent issues with PHP and Java,
careless usage of Gay's code might lead to an infinite loop.

- As Tobias mentioned, there was enough issues with adapting Gay's code for
libquadmath that it was replaced with code from glibc.

- OTOH, currently we make use of {quadmath_}snprintf and strto{f,,ld,flt128},
which seem to be competently implemented at least on the widely used targets
(that is, they provide correctly rounded behavior), and are widely used also
outside of gfortran. This should definitely not be underestimated.


[Bug rtl-optimization/48774] [4.6/4.7 Regression] gcc-4.6.0 optimization regression on x86_64-unknown-linux-gnu

2011-04-27 Thread xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48774

davidxl  changed:

   What|Removed |Added

 CC||xinliangli at gmail dot com

--- Comment #3 from davidxl  2011-04-27 19:04:12 
UTC ---
(In reply to comment #2)
> It is caused by revision 162653:
> 
> http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg01007.html


Looked at IVOPT transformation -- seems ok.

The program passes with the following options:


 -O2 -funroll-loops regression.c -fno-tree-vrp -fno-tree-dominator-opts
-fno-gcse

Removing any of the -fno-xxx options, the program fail. -fno-gcse makes
difference indicates tree level transformations are fine -- possibly bad
aliasing?

David


[Bug libstdc++/48750] for_each_template_random_access_ed has unbalanced new/delete[]

2011-04-27 Thread singler at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48750

sing...@gcc.gnu.org  changed:

   What|Removed |Added

 CC||singler at gcc dot gnu.org

--- Comment #16 from singler at gcc dot gnu.org  
2011-04-27 19:59:29 UTC ---
I have reviewed the patch, it looks mostly fine.  Thanks!
Only line 606 of losertree.h might not yet be fully consistent with line 597. 
I'm not sure all loser tree members are correctly constructed in the first
place.

We might have to add

for (unsigned int __i = 0; __i < _M_k; ++__i)
  {
::new(&(_M_losers[__i]._M_key)) _Tp(__sentinel);
_M_losers[__i]._M_source = -1;
  }

I will test that...

We have used these ::operator new/placement new construction to avoid calling
the default constructor, which might not be available for the ValueType. 
Interference with the actual parallelism should be minimal.


[Bug libstdc++/48750] for_each_template_random_access_ed has unbalanced new/delete[]

2011-04-27 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48750

--- Comment #17 from Paolo Carlini  2011-04-27 
20:23:25 UTC ---
Thanks Johannes. Indeed, I was still a little nervous about those bits of
losertree.h. If you can, please make sure that (even if it costs a bit of
performance):

  1- After memory allocation, the first time each objects is constructed, via
placement new, not assigned.
  2- All the following times are assigned, not constructed.
  3- All the object are destructed, once, by calling explicitly the destructor,
in the destructor of _LoserTree* class, before deallocating the memory via
operator delete. Careful not trying to destruct objects never constructed in
the first place.

In general, I recommend preparing a tiny snippet code exercising the parallel
code at issue and running it under valgrind (doing that yesterday for the
elements of a vector, for sort, stable_sort, etc, turned out to be
rather "interesting" ;)

Please, keep me up to date, we want to resolve this for 4.6.1, I think.


[Bug fortran/48788] [4.6/4.7 Regression] ICE: SIGSEGV in resolve_global_procedure (resolve.c:2190) on invalid (?) fortran code

2011-04-27 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48788

--- Comment #2 from Tobias Burnus  2011-04-27 
20:32:26 UTC ---
Author: burnus
Date: Wed Apr 27 20:32:21 2011
New Revision: 173048

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173048
Log:
2011-04-27  Tobias Burnus  

PR fortran/48788
* resolve.c (resolve_global_procedure): Error recovery -
avoid segfault for (non)character-returning functions.

2011-04-27  Tobias Burnus  

PR fortran/48788
* gfortran.dg/whole_file_34.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/whole_file_34.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog


[Bug middle-end/48752] [4.7 Regression] ICE in evaulate_conditions_for_edge at ipa-inline-analysis.c:466

2011-04-27 Thread dave at hiauly1 dot hia.nrc.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48752

--- Comment #16 from dave at hiauly1 dot hia.nrc.ca 2011-04-27 21:08:26 UTC ---
On Wed, 27 Apr 2011, hubicka at ucw dot cz wrote:

> I hope the problem is now fixed at mainline tree.  Could you please give it a
> try?

Bug is still present in revision 173047.  Running C testsuite.

Dave


[Bug libstdc++/48760] [4.6 / 4.7 Regression] std::complex constructor buggy in the face of NaN's

2011-04-27 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48760

Paolo Carlini  changed:

   What|Removed |Added

 CC|jason at gcc dot gnu.org,   |
   |jason at redhat dot com |
 AssignedTo|paolo.carlini at oracle dot |jason at redhat dot com
   |com |

--- Comment #24 from Paolo Carlini  2011-04-27 
21:38:49 UTC ---
Jason is on it.


[Bug target/48673] [4.7 Regression] GCC generates WAW and RAW conflicts on IA64.

2011-04-27 Thread sje at cup dot hp.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48673

--- Comment #2 from Steve Ellcey  2011-04-27 21:58:53 
UTC ---
It looks like I was wrong about this showing up on IA64 Linux.  I am only
seeing it on IA64 HP-UX and only in 32 bit mode.  That probably means it is
related to the HP-UX pointer extension (addp4).  Do you have access to an HP-UX
system?


[Bug c++/48530] [C++0x][SFINAE] Hard errors with deleted d'tors

2011-04-27 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48530

--- Comment #3 from Daniel Krügler  
2011-04-27 21:59:48 UTC ---
(In reply to comment #2)
> Fixed.

Thanks Jason. I just see that the slightly revised example with an additional
defaulted c'tor gives me an ICE at the line marked with the X:

//---
template
char f(int);

template
char (&f(...))[2];

struct DelDtor {
  DelDtor() = default;
  ~DelDtor() = delete;
};

static_assert(sizeof(f(0)) != 1, "Error"); // X

int main() {}
//---

"main.cpp:14:34: internal compiler error: tree check: expected target_expr,
have
error_mark in build_cplus_new, at cp/tree.c:459"

I assume that should be reopened or shall I create a new entry?

The more detailed report via -v -save-temps gives the following output:

\Develop\cygwin\home\Daniel\jasongcc\bin\jasong++ -v -save-temps -std=c++0x
-Wall main.cpp
Using built-in specs.
COLLECT_GCC=/home/Daniel/jasongcc/bin/jasong++
COLLECT_LTO_WRAPPER=/home/Daniel/jasongcc/libexec/gcc/i686-pc-cygwin/4.7.0/lto-w
rapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/f/Develop/gcc-jason/gcc/configure
--program-transform
-name='s/^g++$/jasong++/' --prefix=/home/Daniel/jasongcc --enable-languages=c++
--disable-bootstrap : (reconfigured)
/cygdrive/f/Develop/gcc-jason/gcc/configure
 --program-transform-name='s/^g++$/jasong++/' --prefix=/home/Daniel/jasongcc
--e
nable-languages=c++ --disable-bootstrap : (reconfigured)
/cygdrive/f/Develop/gcc
-jason/gcc/configure --program-transform-name='s/^g++$/jasong++/'
--prefix=/home
/Daniel/jasongcc --enable-languages=c++ --disable-bootstrap : (reconfigured)
/cy
gdrive/f/Develop/gcc-jason/gcc/configure
--program-transform-name='s/^g++$/jason
g++/' --prefix=/home/Daniel/jasongcc --enable-languages=c++ --disable-bootstrap
: (reconfigured) /cygdrive/f/Develop/gcc-jason/gcc/configure
--program-transform
-name='s/^g++$/jasong++/' --prefix=/home/Daniel/jasongcc --enable-languages=c++
--disable-bootstrap : (reconfigured)
/cygdrive/f/Develop/gcc-jason/gcc/configure
 --program-transform-name='s/^g++$/jasong++/' --prefix=/home/Daniel/jasongcc
--e
nable-languages=c++ --disable-bootstrap : (reconfigured)
/cygdrive/f/Develop/gcc
-jason/gcc/configure --program-transform-name='s/^g++$/jasong++/'
--prefix=/home
/Daniel/jasongcc --enable-languages=c++ --disable-bootstrap : (reconfigured)
/cy
gdrive/f/Develop/gcc-jason/gcc/configure
--program-transform-name='s/^g++$/jason
g++/' --prefix=/home/Daniel/jasongcc --enable-languages=c++ --disable-bootstrap
: (reconfigured) /cygdrive/f/Develop/gcc-jason/gcc/configure
--program-transform
-name='s/^g++$/jasong++/' --prefix=/home/Daniel/jasongcc --enable-languages=c++
--disable-bootstrap
Thread model: single
gcc version 4.7.0 20110427 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-Wall' '-shared-libgcc'
'-m
tune=generic' '-march=pentiumpro'
 /home/Daniel/jasongcc/libexec/gcc/i686-pc-cygwin/4.7.0/cc1plus.exe -E -quiet
-v
 -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -idirafter
/usr/lib/../i
nclude/w32api -idirafter ../../include/w32api main.cpp -mtune=generic
-march=pen
tiumpro -std=c++0x -Wall -fpch-preprocess -o main.ii
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/home/Daniel/jasongcc/lib/gcc/i686-pc-cygwin/4.7
.0/../../../../i686-pc-cygwin/include"
ignoring nonexistent directory "../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:

/home/Daniel/jasongcc/lib/gcc/i686-pc-cygwin/4.7.0/../../../../include/c++/4.7.
0

/home/Daniel/jasongcc/lib/gcc/i686-pc-cygwin/4.7.0/../../../../include/c++/4.7.
0/i686-pc-cygwin

/home/Daniel/jasongcc/lib/gcc/i686-pc-cygwin/4.7.0/../../../../include/c++/4.7.
0/backward
 /home/Daniel/jasongcc/lib/gcc/i686-pc-cygwin/4.7.0/include
 /home/Daniel/jasongcc/include
 /home/Daniel/jasongcc/lib/gcc/i686-pc-cygwin/4.7.0/include-fixed
 /usr/include
 /usr/lib/../include/w32api
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-Wall' '-shared-libgcc'
'-m
tune=generic' '-march=pentiumpro'
 /home/Daniel/jasongcc/libexec/gcc/i686-pc-cygwin/4.7.0/cc1plus.exe
-fpreprocess
ed main.ii -quiet -dumpbase main.cpp -mtune=generic -march=pentiumpro -auxbase
m
ain -Wall -std=c++0x -version -o main.s
GNU C++ (GCC) version 4.7.0 20110427 (experimental) (i686-pc-cygwin)
compiled by GNU C version 4.3.4 20090804 (release) 1, GMP version
4.3.1,
 MPFR version 2.4.1-p5, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.7.0 20110427 (experimental) (i686-pc-cygwin)
compiled by GNU C version 4.3.4 20090804 (release) 1, GMP version
4.3.1,
 MPFR vers

[Bug c/48793] Optimization -O2 Incorrectly Removes Logic

2011-04-27 Thread chris at durso dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48793

--- Comment #2 from Chris DUrso  2011-04-27 22:36:16 
UTC ---
Hi Andreas,

Are you saying that 

myInteger = -myInteger;


or 

if( myInteger < 0 ) 


is undefined for the integer MIN_INT?


Read a little closer, the overflow/underflow/abs are just examples.  The
problem is that the second if-statement is apparently optimized away.


[Bug middle-end/48794] [4.7 Regression] ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop

2011-04-27 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48794

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.04.27 22:51:10
 CC||rguenth at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from H.J. Lu  2011-04-27 22:51:10 
UTC ---
It is caused by revision 171450:

http://gcc.gnu.org/ml/gcc-cvs/2011-03/msg00874.html


[Bug c/48793] Optimization -O2 Incorrectly Removes Logic

2011-04-27 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48793

--- Comment #3 from Andrew Pinski  2011-04-27 
22:59:51 UTC ---
(In reply to comment #2)
> myInteger = -myInteger;
> 
> is undefined for the integer MIN_INT?

The above is undefined for the value of MIN_INT.  As there is an overflow as
-MIN_INT is not representable in the type int.


[Bug c++/48530] [C++0x][SFINAE] Hard errors with deleted d'tors

2011-04-27 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48530

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #4 from Paolo Carlini  2011-04-27 
23:02:29 UTC ---
The issue noticed by Daniel in Comment #3 seems simple: happens only with
checking enabled and disappears with the below (which passes testing).

Jason, if you want, I can handle this.

/

Index: tree.c
===
--- tree.c(revision 173048)
+++ tree.c(working copy)
@@ -456,6 +456,9 @@ build_cplus_new (tree type, tree init, tsubst_flag
 return rval;

   rval = build_target_expr (slot, rval, complain);
+  if (rval == error_mark_node)
+return error_mark_node;
+
   TARGET_EXPR_IMPLICIT_P (rval) = 1;

   return rval;


[Bug c++/48530] [C++0x][SFINAE] Hard errors with deleted d'tors

2011-04-27 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48530

--- Comment #5 from H.J. Lu  2011-04-27 23:07:09 
UTC ---
(In reply to comment #4)
> The issue noticed by Daniel in Comment #3 seems simple: happens only with
> checking enabled and disappears with the below (which passes testing).
> 
> Jason, if you want, I can handle this.
> 
> /
> 
> Index: tree.c
> ===
> --- tree.c(revision 173048)
> +++ tree.c(working copy)
> @@ -456,6 +456,9 @@ build_cplus_new (tree type, tree init, tsubst_flag
>  return rval;
> 
>rval = build_target_expr (slot, rval, complain);
> +  if (rval == error_mark_node)
> +return error_mark_node;
> +
>TARGET_EXPR_IMPLICIT_P (rval) = 1;
> 
>return rval;

Why not just

if (rval != error_mark_node)
  TARGET_EXPR_IMPLICIT_P (rval) = 1;

return rval;


[Bug c++/48530] [C++0x][SFINAE] Hard errors with deleted d'tors

2011-04-27 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48530

--- Comment #6 from Paolo Carlini  2011-04-27 
23:09:09 UTC ---
Sure.


[Bug tree-optimization/48795] New: -Warray-bounds false positive

2011-04-27 Thread niko.lecam at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48795

   Summary: -Warray-bounds false positive
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: niko.le...@gmail.com


$ gcc -v
Utilisation des specs internes.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configuré avec: /build/src/gcc-4.6-20110415/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --enable-gnu-unique-object
--enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto
--enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--enable-multilib --disable-libstdcxx-pch --enable-checking=release
Modèle de thread: posix
gcc version 4.6.0 20110415 (prerelease) (GCC)

$ cat t.c 
/* testcase (derived from wine) */
typedef struct
{
  int len;
  char data[1];
} rec;

int
p(rec *r, int len);

int
f (char prm1, char prm2)
{
  char buf[10];

  rec *r1 = (rec *)&buf;

  r1->len = 10;
  r1->data[0] = prm1;
  r1->data[1] = prm2;

  return p(r1, r1->len);
}

$ gcc -S -O2 -Wall t.c -save-temps
t.c: In function ‘f’:
t.c:19:11: attention : array subscript is above array bounds [-Warray-bounds]


  1   2   >