Re: [patch, libgfortran] PR48906 Wrong rounding results with -m32

2011-06-11 Thread Thomas Henlich
> I don't agree with this; with the patch we now output 10 significant > digits, whereas 9 is sufficient for a binary->ascii->binary roundtrip. > So please retain the "reduce d by one when E editing is used" thing > for list format and G0. This is just a side effect of using 1PGw.d > format for lis

Re: [patch, fortran] Some more TRIM optimizations

2011-06-11 Thread Thomas Koenig
Hi Jerry, Ping ** 0.5714 Full patch can be found at http://gcc.gnu.org/ml/fortran/2011-06/msg00053.html OK and thanks for patch. Sendingfortran/ChangeLog Sendingfortran/frontend-passes.c Sendingtestsuite/ChangeLog Adding testsuite/gfortran.dg/trim_optimize

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-06-11 Thread Tom de Vries
Hi Zdenek, On 05/31/2011 10:04 AM, Zdenek Dvorak wrote: > Hi, > >> As far as I can tell, what is current calculated in i_bound (and assigned to >> nb_iterations_upper_bound), is the maximum amount of times any statement in >> the >> loop is executed, where any includes exit tests. Differently pu

[Patch, libfortran] PR 49296 List read of file without EOR

2011-06-11 Thread Janne Blomqvist
Hi, attached patch fixes PR 49296. A new test for the testsuite is also included. Regtested on x86_64-unknown-linux-gnu, Ok for trunk? 2011-06-11 Janne Blomqvist PR libfortran/49296 * io/list_read.c (read_character): Accept EOF as a separator when reading string. --

[PATCH, i386]: Use default value in "isa" attribute.

2011-06-11 Thread Uros Bizjak
Hello! "base" is the default value for "isa" attribute. Also, reimplement long lines with "cond" RTX. 2011-06-11 Uros Bizjak * config/i386/i386.md: Use default value in "isa" attribute. * config/i386/sse.md: Ditto. * config/i386/mmx.md: Ditto. Tested on x86_64-pc-lin

[Patch, libfortran, committed] Use lseek() to figure out if a file is seekable

2011-06-11 Thread Janne Blomqvist
Hi, currently we try to figure out whether a fd is seekable by looking at the mode returned by fstat(). Turns out this is not enough, as there are some character special files that are seekable. Thus, change the logic to try an lseek(). Committed as obvious. Index: ChangeLog

[Patch, libfortran, committed] Return error when trying to seek a non-seekable buffered file

2011-06-11 Thread Janne Blomqvist
Hi, In libgfortran, buffered and unbuffered IO should work the same except for the buffering. For the unbuffered IO, seek and tell operations reduce to calls to lseek(). Thus, if the file is not seekable, they return -1 and set errno. Or strictly speaking, POSIX says that lseek() on a non-seekable

[PATCH, i386]: Fix mode of forced register in vec_dupv4sf

2011-06-11 Thread Uros Bizjak
Hello! 2011-06-11 Uros Bizjak * config/i386/sse.md (vec_dupv4sf): Correct mode of forced register. (*vec_dupv2df): Rename from vec_dupv2df. (vec_dupv2df): New expander. Tested on x86_64-pc-linux-gnu {,-m32}. Committed to mainline SVN, will also be committed to 4.5 and

[v3] test uses_allocator for promise and packaged_task

2011-06-11 Thread Jonathan Wakely
2011-06-11 Jonathan Wakely * testsuite/30_threads/packaged_task/uses_allocator.cc: New. * testsuite/30_threads/promise/uses_allocator.cc: Likewise. A couple of new tests to verify that uses_allocator is specialized for promise and packaged_task. Tested x86_84-linux and committ

Re: [patch, libgfortran] PR48906 Wrong rounding results with -m32

2011-06-11 Thread jerry DeLisle
On 06/11/2011 12:23 AM, Thomas Henlich wrote: I don't agree with this; with the patch we now output 10 significant digits, whereas 9 is sufficient for a binary->ascii->binary roundtrip. So please retain the "reduce d by one when E editing is used" thing for list format and G0. This is just a side

Cgraph alias reorg 16/14 (fix latent bug in ipa.c)

2011-06-11 Thread Jan Hubicka
Hi, there is typo in cgraph_comdat_can_be_unshared_p that causes us to sometimes diverge in visibility of the single comdat group that leads to undefined symbols in Mozlla. Fixed thus. Bootstrapped/regtested x86_64-linux, comitted. Index: ChangeLog ===

Cgraph alias reorg 17/14 (fix ipa-prop computation of varying args)

2011-06-11 Thread Jan Hubicka
Hi, while breaking up the patch Imissed two pots in ipa-prop, where we need to walk aliases. This leads to segfault while compiling Mozilla. Also because alled_with_var_arguments is recomputed at IPA time, we don't need to stream it. Bootstrapped/regtested x86_64-linux, comitted. Honza Index:

[v3] adjust allocator_traits testcase

2011-06-11 Thread Jonathan Wakely
2011-06-11 Jonathan Wakely * testsuite/20_util/allocator_traits/requirements/typedefs.cc: Check for allocator_type and value_type. Tested x86_64-linux, committed to trunk. Index: testsuite/20_util/allocator_traits/requirements/typedefs.cc ===

PATCH [0/n]: Prepare middle-end for x32 branch merge

2011-06-11 Thread H.J. Lu
Hi, I am submitting a series of middle-end patches to prepare for x32 branch merge. GCC has a very good support for Pmode != ptr_mode. However x32 branch exposes some corner cases where GCC generates x86 specific optimizations, like strlen expansion. Those patches are needed for x32 support. H

PATCH [1/n]: Prepare x32: PR middle-end/47364: internal compiler error: in emit_move_insn, at expr.c:3355

2011-06-11 Thread H.J. Lu
Hi, expand_builtin_strlen has src_reg = gen_reg_rtx (Pmode); ... pat = expand_expr (src, src_reg, ptr_mode, EXPAND_NORMAL); if (pat != src_reg) emit_move_insn (src_reg, pat); But src_reg may be in ptr_mode, wich may not be the same as Pmode. This patch checks it. OK for trunk? Thanks. H.J.

Cgraph alias reorg 18/14 (fix LTO symtab streaming)

2011-06-11 Thread Jan Hubicka
Hi, another hunk that got lost. We need to stream aliases into the symbol table. For some reason this cuase very little trouble... Bootstrapped/regtested x86_64-linux. Comitted. Honza Index: ChangeLog === --- ChangeLog (revision 17

[v3] improve allocator_traits test

2011-06-11 Thread Jonathan Wakely
2011-06-11 Jonathan Wakely * testsuite/20_util/allocator_traits/requirements/ explicit_instantiation.cc: Add another instantiation. Tested x86_64-linux, committed to trunk. Index: testsuite/20_util/allocator_traits/requirements/explicit_instantiation.cc

RFC: __gnu_cxx::__alloc_traits extension

2011-06-11 Thread Jonathan Wakely
Here's the next piece of my ongoing allocator work, which I think is ready to check in. I've moved allocator_traits to a separate header, so it can be used without including the definition of std::allocator, so this means we'll have: bits/uses_allocator.h: std::allocator_arg, std::uses_allocator

PATCH [2/n]: Prepare x32: Convert pointer to TLS symbol if needed

2011-06-11 Thread H.J. Lu
Hi, Backend may promote pointers to Pmode. Before we force a TLS symbol to a pseudo, we may need to convert it to proper mode. OK for trunk? Thanks. H.J. 2011-06-11 H.J. Lu * calls.c (precompute_register_parameters): Convert pointer to TLS symbol if needed. diff --gi

PATCH [3/n]: Prepare x32: PR rtl-optimization/49088: Combine fails to properly handle zero-extension and signed int constant

2011-06-11 Thread H.J. Lu
See: http://gcc.gnu.org/ml/gcc-patches/2011-05/msg02150.html for an analysis. OK for trunk? Thanks. H.J. --- 2011-05-21 H.J. Lu PR rtl-optimization/49088 * combine.c (force_to_mode): If X is narrower than MODE and we want all the bits in X's mode, just use the oper

Re: [patch, libgfortran] PR48906 Wrong rounding results with -m32

2011-06-11 Thread Thomas Henlich
On Sat, Jun 11, 2011 at 14:41, jerry DeLisle wrote: > This was established as solution to PR48488 where we had two choices for > selecting the significant digits. Nine significant digits was established as > a requirement to guarantee round trip in all cases. The char4_iunit_1.f03 > test case was

PATCH [4/n]: Prepare x32: Permute the conversion and addition if one operand is a constant

2011-06-11 Thread H.J. Lu
Hi, convert_memory_address_addr_space has a special PLUS/MULT case for POINTERS_EXTEND_UNSIGNED < 0. It turns out that it is also needed for all Pmode != ptr_mode cases. OK for trunk? Thanks. H.J. --- 2011-06-11 H.J. Lu PR middle-end/47727 * explow.c (convert_memory_addres

Re: _ExtPtr_allocator

2011-06-11 Thread Jonathan Wakely
On 10 June 2011 22:06, Jonathan Wakely wrote: > > * overload construct and destroy so both the old- and new-style > signatures are present. > >      template >        void >        construct(pointer __p, _Args&&... __args) >        { construct(__p.get(), std::forward<_Args>(__args)...); } > >      

PATCH [5/n]: Prepare x32: PR middle-end/48016: Inconsistency in non-local goto save area

2011-06-11 Thread H.J. Lu
Hi, We are very inconsistent when saving and restoring non-local goto save area. See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48016 for detailed analysis. OK for trunk? Thanks. H.J. --- 2011-06-07 H.J. Lu PR middle-end/48016 * explow.c (emit_stack_save): Adjust mode

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-11 Thread H.J. Lu
On Sat, Jun 11, 2011 at 5:55 AM, Jan Hubicka wrote: > Hi, > this patch complettes the same body alias rework by removing the old same body > alias code and adding new representation.  Same body aliases are now separate > function nodes that have IPA_REF_ALIAS reference to the node they are alias

Re: [PATCH, i386]: Fix mode of forced register in vec_dupv4sf

2011-06-11 Thread H.J. Lu
On Sat, Jun 11, 2011 at 4:16 AM, Uros Bizjak wrote: > Hello! > > 2011-06-11  Uros Bizjak   > >        * config/i386/sse.md (vec_dupv4sf): Correct mode of forced register. >        (*vec_dupv2df): Rename from vec_dupv2df. >        (vec_dupv2df): New expander. > > Tested on x86_64-pc-linux-gnu {,-m3

Re: [patch, testsuite] Fix g++.dg/opt/devirt2.C scanning, PR 48727

2011-06-11 Thread Mike Stump
On Jun 10, 2011, at 9:28 AM, Steve Ellcey wrote: > I will check in this testsuite fix as obvious if there are no objections. Thanks for the comments. When doing a port, having a comment on other port's issues with a testcase, is useful, as you get to say, gosh, I'm in that class too, and just b

Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10))

2011-06-11 Thread Mike Stump
On Jun 10, 2011, at 7:20 AM, Richard Guenther wrote: > On Fri, 10 Jun 2011, Jason Merrill wrote: > >> On 06/10/2011 10:03 AM, Richard Guenther wrote: > *((volatile int *)&a[0] + 1) It would be correct to fold it to VIEW_CONVERT_EXPR >>> >>> No, it wouldn't be correct. I

Re: [google] Enhance Annotalysis to support cloned functions/methods (issue4591066)

2011-06-11 Thread dnovillo
OK with some minor nits. Diego. http://codereview.appspot.com/4591066/diff/3001/gcc/tree-threadsafe-analyze.c File gcc/tree-threadsafe-analyze.c (right): http://codereview.appspot.com/4591066/diff/3001/gcc/tree-threadsafe-analyze.c#newcode1159 gcc/tree-threadsafe-analyze.c:1159: gcc_assert (

Re: [patch, libgfortran] PR48906 Wrong rounding results with -m32

2011-06-11 Thread jvdelisle
On Sat, Jun 11, 2011 at 8:56 AM, Thomas Henlich wrote: On Sat, Jun 11, 2011 at 14:41, jerry DeLisle wrote: This was established as solution to PR48488 where we had two choices for selecting the significant digits. Nine significant digits was established as a requirement to guarantee round tri

Re: [PATCH PR45098, 7/10] Nowrap limits iterations

2011-06-11 Thread Zdenek Dvorak
Hi, > > I think a better fix would be to make the nb_iterations_upper_bound > > semantics > > consistent with that of nb_iterations. Let me try to do it, hopefully this > > should > > be mostly mechanical, > > > > This patch changes the semantics of nb_iterations_upper_bound and > nb_iteratio

Is VIEW_CONVERT_EXPR an lvalue? (was Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)))

2011-06-11 Thread Jason Merrill
On 06/10/2011 10:20 AM, Richard Guenther wrote: no, a VIEW_CONVERT_EXPR is generally not an lvalue (fold for example would turn the above to (volatile int) a[1]). The gimplifier seems to consider it an lvalue: gimplify_expr uses gimplify_compound_lval for it, and gimplify_addr_expr handles tak

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-11 Thread H.J. Lu
On Sat, Jun 11, 2011 at 9:15 AM, H.J. Lu wrote: > On Sat, Jun 11, 2011 at 5:55 AM, Jan Hubicka wrote: >> Hi, >> this patch complettes the same body alias rework by removing the old same >> body >> alias code and adding new representation.  Same body aliases are now separate >> function nodes tha