Re: Optimize calls to functions that return one of their arguments

2012-05-15 Thread Eric Botcazou
Ok, that looks like three votes in favour. I've checked in the following variant with a few minor changes. I've added strcpy and memset to the list of functions, and split off a new function in ira-lives. Changes to subdirectories must be documented in the subdirectory's ChangeLog (ada,

Re: Fix debug/52727 -- lost REG_ARGS_SIZE note

2012-05-15 Thread Eric Botcazou
Losing REG_ARGS_SIZE notes leads to assertion failures in dwarf2cfi.c when the values don't match across CFG edges. I'd like to leave this patch on mainline for a week or so to see what falls out before copying it to the 4.7 branch. There is a new abort here, though I suppose that would

Re: Ping: always supply a mode to plus_constant

2012-05-15 Thread Eric Botcazou
The following patch fixes the build (not reg-tested, but looks obvious): 2012-05-14 Tristan Gingold ging...@adacore.com * config/ia64/ia64.c (ia64_expand_prologue): Adjust calls to plus_constant. Applied as obvious after fixing the ChangeLog. -- Eric Botcazou

Re: Use sed -n … instead of sed s/…/p -e d in s-header-vars

2012-05-15 Thread Robert Dewar
On 5/14/2012 11:22 PM, Hans-Peter Nilsson wrote: Random non-maintainer comments: I'd suggest adding a nearby comment to avoid a future edit changing it back. The attachment with the patch had the mime-type Video/X-DV, maybe indicating an issue with your mail-client setup mismatching the .dif

Re: Missing guard in ira-color.c ?

2012-05-15 Thread Tristan Gingold
On May 10, 2012, at 10:41 PM, Vladimir Makarov wrote: On 05/10/2012 09:10 AM, Tristan Gingold wrote: Hi, I am getting a segfault in ira-color.c:2945 on the trunk: Program received signal SIGSEGV, Segmentation fault. 0x00a79f37 in move_spill_restore () at

[Patch]: Fix typo in common/config/ia64/ia64-common.c

2012-05-15 Thread Tristan Gingold
hi, looks like a typo... Ok for trunk ? Tristan. 2012-05-14 Tristan Gingold ging...@adacore.com * common/config/ia64/ia64-common.c (ia64_except_unwind_info): Fix typo. diff --git a/gcc/common/config/ia64/ia64-common.c b/gcc/common/config/ia64/ia64- index 1168253..79aed6a 100644 ---

[PATCH v2]: handle size_t /= ptr size in tree-ssa-strlen.c

2012-05-15 Thread Tristan Gingold
On May 4, 2012, at 2:34 PM, Richard Guenther wrote: On Fri, May 4, 2012 at 2:27 PM, Tristan Gingold ging...@adacore.com wrote: Hi, get_string_length assumes that precision of size_t is the same as precision of a pointer, which isn't always true at least on VMS. This patch simply add a

[Patch]: Fix ICE by expand_expr_addr_expr_1

2012-05-15 Thread Tristan Gingold
Hi, I got ICE in plus_constant (after the assertions were added) due to expand_expr_addr_expr_1 during build on ia64/Openvms. This function is called with TMODE == SImode (32 bit pointers) but EXP designating a variable on the frame (whose register is DImode). Hence the ICE. Fixed by the

[Patch, libgfortran] Pass mode in open for O_CREAT and on VxWorks

2012-05-15 Thread Tobias Burnus
Dear all, the motivation for the following is rbmj's patch for libstdc++ on VxWorks, cf. http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00073.html Note that gfortan is used on VxWorks as the following email proves: http://gcc.gnu.org/ml/fortran/2012-02/msg00115.html (VxWorks is a real-time

Re: [RFC] PR 51712 -Wtype-limits should not trigger for enum constants

2012-05-15 Thread Richard Guenther
On Mon, May 14, 2012 at 8:47 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Mon, 14 May 2012, Manuel López-Ibáñez wrote: PING: http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00383.html The general idea of checking this information in shorten_compare seems reasonable.  (shorten_compare's

[Patch]: Fix very large frame bug on i386

2012-05-15 Thread Tristan Gingold
Hi, use of 'unsigned int' for i386.c:ix86_compute_frame_layout stack_alignment_needed results in truncation of frame offset in code such as: offset = (offset + stack_alignment_needed - 1) -stack_alignment_needed (as it is -stack_alignment_needed that is converted to HOST_WIDE_INT). As a

Re: [PATCH v2]: handle size_t /= ptr size in tree-ssa-strlen.c

2012-05-15 Thread Richard Guenther
On Tue, May 15, 2012 at 10:55 AM, Tristan Gingold ging...@adacore.com wrote: On May 4, 2012, at 2:34 PM, Richard Guenther wrote: On Fri, May 4, 2012 at 2:27 PM, Tristan Gingold ging...@adacore.com wrote: Hi, get_string_length assumes that precision of size_t is the same as precision of a

[PATCH] Move gimple_set_modified

2012-05-15 Thread Richard Guenther
This moves gimple_set_modified to be inlined. One important user is update_stmt which looks like static inline void update_stmt (gimple s) { if (gimple_has_ops (s)) { gimple_set_modified (s, true); update_stmt_operands (s); } } and thus either is not worth inlining or we

[Patch]: Fix call to end_prologue debug hook

2012-05-15 Thread Tristan Gingold
Hi, the end_prologue debug hook (only used by dwarf on VMS) is currently called at the NOTE_INSN_FUNCTION_BEG. This is not what its name implies, neither what the VMS debugger expect and neither what a comment in dwarf2out.c says: /* Recall that this end-of-prologue indication is *not* the

[Ada] Deferred constants are not always compile time known values in Alfa mode

2012-05-15 Thread Arnaud Charlet
Outside of the scope of their full view, deferred constants are not anymore considered as compile time known values in Alfa mode. This allows parameterized formal verification, in which a deferred constant value if not known from client units. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Avoid incorrect detection of duplicate sources that are excluded

2012-05-15 Thread Arnaud Charlet
If two projects in the hierarchy had a common source directory but through exclusion partitioned the sources in this source directory, the project manager was still finding incorrect source duplications. This patch corrects this. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-05-15

[Ada] Better control of help message in GNAT.Command_Line

2012-05-15 Thread Arnaud Charlet
This is a cosmetic change only, and gives better control over the help message that is automatically generated from the definition of valid switches. Instead of using the generic name ARG, users can now specify their own name, which sometimes helps clarify the intents of the parameter. Tested on

Re: [PATCH v2]: handle size_t /= ptr size in tree-ssa-strlen.c

2012-05-15 Thread Tristan Gingold
On May 15, 2012, at 11:13 AM, Richard Guenther wrote: On Tue, May 15, 2012 at 10:55 AM, Tristan Gingold ging...@adacore.com wrote: On May 4, 2012, at 2:34 PM, Richard Guenther wrote: On Fri, May 4, 2012 at 2:27 PM, Tristan Gingold ging...@adacore.com wrote: Hi, get_string_length

[Ada] Clean up System.Address_To_Access_Conversions

2012-05-15 Thread Arnaud Charlet
This patch does a bit of cleanup in System.Address_To_Access_Conversions. No change in behavior; no test. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-05-15 Bob Duff d...@adacore.com * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body with pragma No_Body.

[PATCH, CR16] Adding memory model attributes

2012-05-15 Thread Ajinkya Dhobale
Hi, Please find the attachment of mem-model.patch. This patch adds memory model attributes 'data16', 'data20', 'data24' and 'data32' for CR16 target. Using these attributes, allocatable address range for each data variable can be controlled individually. Can someone please review the patch

[Ada] Case statements over predicated subtypes

2012-05-15 Thread Arnaud Charlet
In Ada 2012, if a subtype has a static predicate the set of its possible values is known statically and those are the alternatives that must be covered in in case statement. If the subtype has dynamic predicates, the alternatives must cover all values of the base type. Compiling nonstaticcase.adb

[Ada] Simplify binder code

2012-05-15 Thread Arnaud Charlet
This patch simply moves code from the binder generated file to a-except, to slightly simplify the binder. Preliminary work. No testcase as there is no functionnal change. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-05-15 Tristan Gingold ging...@adacore.com * bindgen.adb

[Ada] Give full msg for finalize/adjust only if -gnateE.

2012-05-15 Thread Arnaud Charlet
The circuitery to save the first exception message (reraised as PE) in finalize or adjust operations has a distributed code size impact. This circuitery is now only enabled when then switch -gnateE is specified. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-05-15 Tristan Gingold

Re: [RFC] PR 51712 -Wtype-limits should not trigger for enum constants

2012-05-15 Thread Manuel López-Ibáñez
On 15 May 2012 11:06, Richard Guenther richard.guent...@gmail.com wrote: On Mon, May 14, 2012 at 8:47 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Mon, 14 May 2012, Manuel López-Ibáñez wrote: PING: http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00383.html The general idea of checking

[v3] PR libstdc++/53339

2012-05-15 Thread Paolo Carlini
Hi, tested x86_64-linux, committed to mainline (see audit trail for details) Thanks, Paolo. / 2012-05-15 Paolo Carlini paolo.carl...@oracle.com PR libstdc++/53339 * include/bits/hashtable_policy.h (__detail::_Identity,

Re: [Fortran, patch] PR 52158 - Regression on character function with gfortran 4.7

2012-05-15 Thread Alessandro Fanfarillo
2012/5/13 Tobias Burnus bur...@net-b.de: Committed as Rev. 187436. Thanks for the patch and congratulation to your first GCC contribution! Thank you for your priceless support! Alessandro

[Ada] Missing DSA remote access to subprogram rules enforcement

2012-05-15 Thread Arnaud Charlet
This change adds missing code to enforce language restrictions for remote access to subprogram types in the case of 'Unchecked_Access and 'Unrestricted_ Access. The following compilation must be rejected with the given error message: $ gcc -c server_main.adb server_main.adb:11:35: prefix must

[Ada] Save occurrence on the stack before calling last chance handler

2012-05-15 Thread Arnaud Charlet
The occurrence was already saved but in dynamically allocated memory. This patch saves it on the stack to avoid the allocation, which useful in case of Storage_Error. No functional change in normal conditions. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-05-15 Tristan Gingold

[Ada] Get rid of compilation warnings in raise-gcc.c

2012-05-15 Thread Arnaud Charlet
No functional change. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-05-15 Tristan Gingold ging...@adacore.com * raise-gcc.c (db_region_for): Use %p + cast to avoid warnings. (get_region_description_for): Likewise. (db_action_for): Likewise.

[Patch, Fortran] PR51055 - accept non-spec-expr i in allocate(character(len=i)::s)

2012-05-15 Thread Tobias Burnus
A rather simple patch. Build and regtested on x86-64-linux. OK for the trunk? I think that is the last patch required for commonly used code. Remaining are issues with array constructors and concatenations - and, of course, deferred-length components. Tobias 2012-05-15 Tobias Burnus

Re: [Fortran] Patch ping

2012-05-15 Thread Bernhard Reutner-Fischer
On Fri, May 11, 2012 at 07:34:30PM +0200, Tobias Burnus wrote: On 18 April 2012 at 18:57, Bernhard Reutner-Fischer wrote: On Tue, Apr 17, 2012 at 12:47:48AM +0200, Tobias Burnus wrote: Approved but not yet committed: Bernhard: - [PATCH] gfortran testsuite: implicitly cleanup-modules, part 2

[Ada] Interfacing aspects in Ada 2012

2012-05-15 Thread Arnaud Charlet
The aspects Convention, Export, and Import are intended to replace the use of the earlier pragmas by the same names. The additional aspects External_Name and Link_Nmae provide the remaining functionality. which previously was provided by additional pragma arguments. Tested on

Re: Optimize calls to functions that return one of their arguments

2012-05-15 Thread Bernd Schmidt
On 05/15/2012 09:12 AM, Eric Botcazou wrote: Ok, that looks like three votes in favour. I've checked in the following variant with a few minor changes. I've added strcpy and memset to the list of functions, and split off a new function in ira-lives. Changes to subdirectories must be documented

Re: Optimize calls to functions that return one of their arguments

2012-05-15 Thread Eric Botcazou
I checked in a fix. Thanks! -- Eric Botcazou

[Ada] Add postconditions to numeric functions

2012-05-15 Thread Arnaud Charlet
Ada RM requires numeric functions to return values in specific ranges, and specific values for some specified argument values. Many of these are now translated as Ada 2012 Post aspects on numeric functions. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-05-15 Yannick Moy

[Ada] Private with-clauses in the context of generic package declarations

2012-05-15 Thread Arnaud Charlet
In ihe context of a generic package declaration, a private with-clause on a child unit implies that the implicit with clauses on its parents are private as well. Previous to this patch, GNAT applied this rule applied only to non- eneric units. Compiling the following must be rejected with:

[Ada] Fix cross-unit inlining on internal inline subprograms

2012-05-15 Thread Arnaud Charlet
This restores cross-unit inlining for user-defined internal inline subprograms invoked from public inline subprograms. This also reworks the algorithm used to compute the list of inlined subprograms passed to gigi. The old algorithm attempts to compute a topological order on the list, and thus

[PATCH diagnostics] Make unwound macro expansion trace less redundant

2012-05-15 Thread Dodji Seketeli
Hello, As discussed previously, the unwinder for macro expansion is quite verbose [1]. This patch proposes to address that shortcoming. Consider this test case: $ cat -n test.c 1 #define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); \ 2 __typeof__(B) __b

[PATCH preprocessor, diagnostics] PR preprocessor/53229 - Fix diagnostics location when pasting tokens

2012-05-15 Thread Dodji Seketeli
Hello, As stated in the audit trail of this problem report, consider this test case: $ cat test.c 1 struct x { 2int i; 3 }; 4 struct x x; 5 6 #define TEST(X) x.##X 7 8 void foo (void)

[C++ Patch] PR 11586

2012-05-15 Thread Paolo Carlini
Hi, this small patch fixes the problem using the approach indicated by Jason in the audit trail, already used in many other similar cases. Booted and tested x86_64-linux. Thanks, Paolo. / /cp 2012-05-15 Paolo Carlini paolo.carl...@oracle.com PR c++/11586

Re: [PATCH preprocessor, diagnostics] PR preprocessor/53229 - Fix diagnostics location when pasting tokens

2012-05-15 Thread Manuel López-Ibáñez
On 15 May 2012 13:18, Dodji Seketeli do...@redhat.com wrote: People seem to like screenshots. Thus, after the patch, we now have:    $ cc1 -quiet test.c    test.c: In function 'foo':    test.c:6:18: error: pasting . and i does not give a valid preprocessing token     #define TEST(X)

Re: patch for PR53125

2012-05-15 Thread Steven Bosscher
On Fri, May 11, 2012 at 8:42 PM, Steven Bosscher stevenb@gmail.com wrote: Now with patch On Fri, May 11, 2012 at 8:42 PM, Steven Bosscher stevenb@gmail.com wrote: 2012-05-10  Vladimir Makarovvmaka...@redhat.com          PR rtl-optimization/53125          * ira.c (ira): Call

[Ada] Couple of small adjustments to cross-unit inlining

2012-05-15 Thread Arnaud Charlet
The first adjustment ensures that the compiler doesn't inline back into the main unit subprograms coming from subunits, since they are already compiled. The second adjustment ensures that the transitive closure algorithm keeps excluding the subprograms not handled by Add_Inlined_Body. Tested on

[Ada] Imaging of arbitrary precision integers

2012-05-15 Thread Arnaud Charlet
The compiler includes an arbitrary precision integer computation library, which is used to handle numeric literals in source code (which are allowed to be of arbitrary size). This change improves the code responsible for producing a string image of such integers by using a single Euclidian

[Ada] Better handling of illegal iterators

2012-05-15 Thread Arnaud Charlet
This patch improves on the error message for a loop iterator where the loop variable is referenced in the name of the iterator. Compiling main.adb must yield: main.adb:26:17: object X cannot be used before end of its declaration --- pragma Ada_2012; pragma Warnings (Off); with Ada.Text_IO;

[Ada] Restrict propagation of atomicity from objects to types

2012-05-15 Thread Arnaud Charlet
The front-end uses a trick to accept a pragma Atomic on objects whose type isn't directly suitable for the pragma: if the type is declared in the same unit as the object, the front-end propagates under the hood the atomicity from the object to the type. This can have unwanted effects, most

[PATCH][1/n] Improve vectorization in PR53355

2012-05-15 Thread Richard Guenther
This is the first patch to make the generated code for the testcase in PR53355 better. It teaches VRP about LSHIFT_EXPRs (albeit only of a very simple form). Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2012-05-15 Richard Guenther rguent...@suse.de PR

find_movable_pseudos vs. split moves (was Re: rx-elf fails after r187015)

2012-05-15 Thread Richard Sandiford
DJ Delorie d...@redhat.com writes: After r187015 (Mar 31), gcc builds for rx-elf are failing with: make[3]: Entering directory `/greed/dj/m32c/gcc/rx-elf-head/rx-elf/64-bit-double/libgcc' # If this is the top-level multilib, build all the other # multilibs.

Re: [C++ Patch] PR 11586

2012-05-15 Thread Jason Merrill
OK. Jason

Re: [PATCH preprocessor, diagnostics] PR preprocessor/53229 - Fix diagnostics location when pasting tokens

2012-05-15 Thread Jason Merrill
On 05/15/2012 07:18 AM, Dodji Seketeli wrote: +paste_tokens (cpp_reader *pfile, source_location lhs_location, If in the long run we want the location passed in to be the ## location, let's drop the lhs from the parameter name. - const cpp_token *result = cpp_get_token (pfile); +

Re: [PATCH] Another fix for TARGET_READ_MODIFY_WRITE i386 peepholes (PR target/53358)

2012-05-15 Thread Uros Bizjak
On Tue, May 15, 2012 at 1:47 PM, Jakub Jelinek ja...@redhat.com wrote: This is a similar problem as PR52086, but back then when looking at whether other peepholes might need similar treatment I didn't think about the possibility that addqi_1 pattern would allow non-q constraint register.  

Re: [RFC] PR 51712 -Wtype-limits should not trigger for enum constants

2012-05-15 Thread Gabriel Dos Reis
On Tue, May 15, 2012 at 4:06 AM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, May 14, 2012 at 8:47 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Mon, 14 May 2012, Manuel López-Ibáñez wrote: PING: http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00383.html The general idea

[PATCH][5/n] Remove mark_symbols_for_renaming

2012-05-15 Thread Richard Guenther
This tackles thunks. Easiest would be to not claim we are in SSA form (we are not) and just go into SSA ... but well. This makes us use helpers properly. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2012-05-15 Richard Guenther rguent...@suse.de *

Re: [RFC] PR 51712 -Wtype-limits should not trigger for enum constants

2012-05-15 Thread Gabriel Dos Reis
On Tue, May 15, 2012 at 4:49 AM, Manuel López-Ibáñez lopeziba...@gmail.com wrote: On 15 May 2012 11:06, Richard Guenther richard.guent...@gmail.com wrote: On Mon, May 14, 2012 at 8:47 PM, Joseph S. Myers jos...@codesourcery.com wrote: On Mon, 14 May 2012, Manuel López-Ibáñez wrote: PING:

Re: remove TARGET_E500 and factorize SPE defaults computation in powerpc ports

2012-05-15 Thread Olivier Hainque
Hello David, Back on this one after Alan's correction and extra testing of the patch on my side. On May 7, 2012, at 18:59 , David Edelsohn wrote: http://gcc.gnu.org/ml/gcc-patches/2010-08/msg01667.html Yes, exactly. If we can work through the fallout, this is exactly the type of cleanup

Re: Use sed -n … instead of sed s/…/p -e d in s-header-vars

2012-05-15 Thread Olivier Hainque
Hello Hans, On May 15, 2012, at 05:22 , Hans-Peter Nilsson wrote: * Makefile.in (s-header-vars): Resort to -n instead of trailing -e d in sed invocation. Random non-maintainer comments: I'd suggest adding a nearby comment to avoid a future edit changing it back. Sure.

Re: [PATCH preprocessor, diagnostics] PR preprocessor/53229 - Fix diagnostics location when pasting tokens

2012-05-15 Thread Dodji Seketeli
Jason Merrill ja...@redhat.com writes: On 05/15/2012 07:18 AM, Dodji Seketeli wrote: +paste_tokens (cpp_reader *pfile, source_location lhs_location, If in the long run we want the location passed in to be the ## location, let's drop the lhs from the parameter name. Dropped. - const

ping: Use sed -n … instead of sed s/…/p -e d in s-header-vars

2012-05-15 Thread Olivier Hainque
Hello, Ping for http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01896.html New patch attached. Following Hans suggestion, I have added a comment to prevent going back to the original scheme and problem in the future. Thanks in advance for your feedback, With Kind Regards, Olivier On Apr 30,

PING: Re: [PR tree-optimization/52558]: RFC: questions on store data race

2012-05-15 Thread Aldy Hernandez
PING. Hi. Sorry for the delay. There were various tricky hiccups along the way to bootstrappability and regression cleanliness... On 04/26/12 04:51, Richard Guenther wrote: On Wed, 25 Apr 2012, Aldy Hernandez wrote: On 04/25/12 06:45, Richard Guenther wrote: On Tue, Apr 24, 2012 at 7:43

[Patch] Use CAN_HAVE_LOCATION_P in EXPR_LOCATION

2012-05-15 Thread Paolo Carlini
Hi, this is something I noticed when looking into more EXPR_LOC_OR_HERE uses in the C++ front-end: I don't think we want to crash if EXPR_LOC_OR_HERE is passed a NULL_TREE. Tested x86_64-linux. Thanks, Paolo. /// 2012-05-15 Paolo Carlini paolo.carl...@oracle.com *

Re: PING: PATCH: Backport x32 support to libtool

2012-05-15 Thread Nathanael Nerode (GCC)
On 05/11/2012 12:50 PM, H.J. Lu wrote: On Mon, Apr 16, 2012 at 10:47 AM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, Apr 3, 2012 at 7:49 AM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, Mar 29, 2012 at 7:34 AM, H.J. Lu hjl.to...@gmail.com wrote: On Sat, Mar 3, 2012 at 9:54 AM, H.J. Lu

Re: PING: PATCH: Backport x32 support to libtool

2012-05-15 Thread H.J. Lu
On Tue, May 15, 2012 at 8:06 AM, Nathanael Nerode (GCC) ncn_gc...@fastmail.fm wrote: On 05/11/2012 12:50 PM, H.J. Lu wrote: On Mon, Apr 16, 2012 at 10:47 AM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, Apr 3, 2012 at 7:49 AM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, Mar 29, 2012 at 7:34 AM,

Re: PING: PATCH: Backport x32 support to libtool

2012-05-15 Thread Nathanael Nerode (GCC)
On 05/15/2012 11:32 AM, H.J. Lu wrote: On Tue, May 15, 2012 at 8:06 AM, Nathanael Nerode (GCC) ncn_gc...@fastmail.fm wrote: On 05/11/2012 12:50 PM, H.J. Lu wrote: On Mon, Apr 16, 2012 at 10:47 AM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, Apr 3, 2012 at 7:49 AM, H.J. Lu hjl.to...@gmail.com

Re: gnu-tm: Dont allow assigning transaction_unsafe functions to transaction_safe function pointers (issue6198054)

2012-05-15 Thread Torvald Riegel
On Tue, 2012-05-08 at 18:02 -0500, Dave Boutcher wrote: Without this patch it is perfectly fine to assign non-transaction_safe functions to function pointers marked as transaction_safe. Unpleasantness happens at run time. e.g. __attribute__((transaction_safe)) long (*compare)(int, int);

Merge from gcc-4_7-branch to gccgo branch

2012-05-15 Thread Ian Lance Taylor
I have merged gcc-4_7-branch revision 187489 to the gccgo branch. Ian

Turn check macros into functions. (issue6188088)

2012-05-15 Thread Lawrence Crowl
The gcc source uses several constructs that GDB does not understand. This patch corrects some of them. It affects only compilers built with ENABLE_TREE_CHECKING, and hence release compilers are unaffected. In particular, I change the implementation of CHECK macros using __extension__ into macros

Re: Turn check macros into functions. (issue6188088)

2012-05-15 Thread Steven Bosscher
On Tue, May 15, 2012 at 7:19 PM, Lawrence Crowl cr...@google.com wrote: The gcc source uses several constructs that GDB does not understand. This patch corrects some of them.  It affects only compilers built with ENABLE_TREE_CHECKING, and hence release compilers are unaffected. Index:

Re: [PATCH] PR preprocessor/7263 - Avoid pedantic warnings on system headers macro tokens

2012-05-15 Thread Jason Merrill
OK. Jason

Re: [PATCH preprocessor, diagnostics] PR preprocessor/53229 - Fix diagnostics location when pasting tokens

2012-05-15 Thread Tom Tromey
Dodji == Dodji Seketeli do...@redhat.com writes: Dodji To properly fix this, I think libcpp should keep the token of the Dodji pasting operator '##', instead of representing it with flag on the LHS Dodji operand's token. That way, it could use its location. Originally I had thought that a

Re: [C++ Patch] PR 44516

2012-05-15 Thread Jason Merrill
On 05/14/2012 07:17 PM, Paolo Carlini wrote: @@ -5670,7 +5672,8 @@ build_x_compound_expr_from_list (tree list, expr_l return error_mark_node; for (list = TREE_CHAIN (list); list; list = TREE_CHAIN (list)) - expr = build_x_compound_expr (expr, TREE_VALUE (list), +

Re: Build problem with libgo runtime

2012-05-15 Thread Ian Lance Taylor
William J. Schmidt wschm...@linux.vnet.ibm.com writes: I'm investigating another build failure for Fedora 17 (based on 4.7). The failing compile from the build log is as follows: /bin/sh ./libtool --tag=CC --mode=compile

Re: Turn check macros into functions. (issue6188088)

2012-05-15 Thread Diego Novillo
On 12-05-15 14:23 , Steven Bosscher wrote: On Tue, May 15, 2012 at 7:19 PM, Lawrence Crowlcr...@google.com wrote: The gcc source uses several constructs that GDB does not understand. This patch corrects some of them. It affects only compilers built with ENABLE_TREE_CHECKING, and hence release

Re: [Patch] Use CAN_HAVE_LOCATION_P in EXPR_LOCATION

2012-05-15 Thread Jason Merrill
OK. Jason

Re: [PATCH, Android] Stack protector enabling for Android target

2012-05-15 Thread Maxim Kuvyrkov
On 12/05/2012, at 9:03 AM, Igor Zamyatin wrote: Hi! Please look at the modified patch in the attachment. ChangeLog remains the same. Tested in android environment(x86_64-*-linux-android), also bootstrapped on x86_64-unknown-linux-gnu. I also started regtesting on linux. Is it ok after

[PATCH] PR rtl-optimization/53352

2012-05-15 Thread Meador Inge
Hi All, As reported in PR rtl-optimization/53352 CSE currently trips up on a paradoxical subreg case. When compiling for ARM GNU/Linux with -O3 the expanded RTL of interest looks like: (insn 12 11 13 3 (set (reg:SI 140) (lshiftrt:SI (reg/v:SI 135 [ tmp1 ]) (const_int 16

[google/gcc-4_7] Allow static const floats unless -pedantic is passed (issue6212051)

2012-05-15 Thread Ollie Wild
To be applied to google/gcc-4_7. Allow static const floats unless -pedantic is passed. This patch allows us to migrate to C++11 more incrementally, since we can leave the static const float initializations in place, flip the switch, and then change it to use constexpr. This is a forward port of

Go patch committed: Don't try to address of a constant

2012-05-15 Thread Ian Lance Taylor
This patch changes the Go frontend to avoid trying to directly take the address of a constant when generating GENERIC. That actually mostly works--unless the DECL_INITIAL of the constant is another constant. This patch changes the code to use a temporary variable instead. Bootstrapped and ran Go

Re: [Ada] Restrict propagation of atomicity from objects to types

2012-05-15 Thread Eric Botcazou
Tested on x86_64-pc-linux-gnu, committed on trunk 2012-05-15 Eric Botcazou ebotca...@adacore.com * sem_prag.adb (Process_Atomic_Shared_Volatile): Propagate atomicity from an object to its underlying type only if it is composite. Backported to the 4.7 branch after

Merge from gcc-4_7-branch to gccgo branch

2012-05-15 Thread Ian Lance Taylor
I've merged gcc 4.7 branch revision 187554 to the gccgo branch. Ian

[Fortran, patch] PR 48831 - Constant expression (PARAMETER array element) rejected as nonconstant

2012-05-15 Thread Alessandro Fanfarillo
Hi All, in attachment there's a patch for PR 48831, it also includes a new test case suggested by Tobias Burnus. The patch is bootstrapped and tested on x86_64-unknown-linux-gnu. Regards. Alessandro Fanfarillo patch.diff Description: Binary data

Re: patch for PR53125

2012-05-15 Thread Vladimir Makarov
On 05/15/2012 07:59 AM, Steven Bosscher wrote: On Fri, May 11, 2012 at 8:42 PM, Steven Bosscherstevenb@gmail.com wrote: Now with patch On Fri, May 11, 2012 at 8:42 PM, Steven Bosscherstevenb@gmail.com wrote: 2012-05-10 Vladimir Makarovvmaka...@redhat.com PR

Re: find_movable_pseudos vs. split moves (was Re: rx-elf fails after r187015)

2012-05-15 Thread Vladimir Makarov
On 05/15/2012 09:08 AM, Richard Sandiford wrote: DJ Deloried...@redhat.com writes: After r187015 (Mar 31), gcc builds for rx-elf are failing with: make[3]: Entering directory `/greed/dj/m32c/gcc/rx-elf-head/rx-elf/64-bit-double/libgcc' # If this is the top-level multilib, build all the other

Re: [C++ Patch] PR 11586

2012-05-15 Thread Paolo Carlini
On 05/15/2012 03:14 PM, Jason Merrill wrote: OK. Thanks. I applied the patch. However, I just noticed that I somehow missed a small issue in the testsuite (sorry): we have a testcase which is now failing because in templates we don't warn anymore (the warning is produced by

Re: [C++ Patch] PR 44516

2012-05-15 Thread Paolo Carlini
Hi, On 05/15/2012 08:53 PM, Jason Merrill wrote: On 05/14/2012 07:17 PM, Paolo Carlini wrote: @@ -5670,7 +5672,8 @@ build_x_compound_expr_from_list (tree list, expr_l return error_mark_node; for (list = TREE_CHAIN (list); list; list = TREE_CHAIN (list)) -expr =

Re: find_movable_pseudos vs. split moves (was Re: rx-elf fails after r187015)

2012-05-15 Thread DJ Delorie
gcc/ * ira.c (pseudo_move_insn): Delete. (find_moveable_pseudos): Don't set it. (move_unallocated_pseudos): Use DF_REG_DEF_CHAIN to find the definitions of the original pseudo. Delete all of them. I can build with this. Thanks!

Re: Turn check macros into functions. (issue6188088)

2012-05-15 Thread Mike Stump
On May 15, 2012, at 11:23 AM, Steven Bosscher wrote: On Tue, May 15, 2012 at 7:19 PM, Lawrence Crowl cr...@google.com wrote: The gcc source uses several constructs that GDB does not understand. This patch corrects some of them. It affects only compilers built with ENABLE_TREE_CHECKING, and

Re: gnu-tm: Dont allow assigning transaction_unsafe functions to transaction_safe function pointers (issue6198054)

2012-05-15 Thread Patrick Marlier
Follow-up of Dave's patch. I would prefer to see such checks in trans-mem.c as follows. In a transaction, a function pointer can be declared and assigned but there is no check that the function pointer is transaction_safe. So at runtime, if the function was unsafe, libitm stops on assert

Re: [google/gcc-4_7] Allow static const floats unless -pedantic is passed (issue6212051)

2012-05-15 Thread Jeffrey Yasskin
Looks good to me. Yay for kicking the can down the road. ;) On Tue, May 15, 2012 at 12:57 PM, Ollie Wild a...@google.com wrote: To be applied to google/gcc-4_7. Allow static const floats unless -pedantic is passed. This patch allows us to migrate to C++11 more incrementally, since we can

Re: trans-mem: functions making indirect calls are not transformed (issue6194061)

2012-05-15 Thread Patrick Marlier
Follow-up of Dave's patch with a testcase. Functions with indirect calls must be transactified (transformed). Tested on i686. Ok for trunk? -- Patrick 2012-05-15 Dave Boutcher daveboutc...@gmail.com Patrick Marlier patrick.marl...@gmail.com * trans-mem.c

Re: [C++ Patch] PR 44516

2012-05-15 Thread Jason Merrill
On 05/15/2012 04:56 PM, Paolo Carlini wrote: @@ -2753,7 +2754,8 @@ build_x_indirect_ref (location_t loc, tree expr, r rval = cp_build_indirect_ref (expr, errorstring, complain); if (processing_template_decl rval != error_mark_node) -return build_min_non_dep (INDIRECT_REF, rval,

Re: [C++ Patch] PR 11586

2012-05-15 Thread Jason Merrill
On 05/15/2012 04:40 PM, Paolo Carlini wrote: However, I just noticed that I somehow missed a small issue in the testsuite (sorry): we have a testcase which is now failing because in templates we don't warn anymore (the warning is produced by warn_for_div_by_zero which also uses

Re: [google/google-main] Fix regression - SUBTARGET_EXTRA_SPECS overridden by LINUX_GRTE_EXTRA_SPECS (issue 6016047)

2012-05-15 Thread jingyu
I suspect this patch would change specs of non-i386 platform. For example, LINUX_GRTE_EXTRA_SPECS is not part of SUBTARGET_EXTRA_SPECS for darwin. Can you tell where SUBTARGET_EXTRA_SPECS is firstly defined for chromeos toolchain? On 2012/05/14 18:32:17, shenhan wrote: On 2012/04/12

Go patch committed: Sort array constructors by index

2012-05-15 Thread Ian Lance Taylor
This patch to the Go frontend sorts array constructors by index. That is what the middle-end expects. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.7 branch. Ian diff -r b4118d35075b go/expressions.cc --- a/go/expressions.cc Tue May 15 12:58:54

Fix PR ada/52494

2012-05-15 Thread Eric Botcazou
Andris Pavenis devised this patch to fix the build for targets which use the s-taprop-dummy.adb package. Applied on mainline and 4.7 branch. 2012-05-15 Andris Pavenis andris.pave...@iki.fi PR ada/52494 * s-taprop-dummy.adb (Specific): New package. -- Eric Botcazou ---

Re: [C++ Patch] PR 44516

2012-05-15 Thread Paolo Carlini
Hi, On 05/16/2012 12:11 AM, Jason Merrill wrote: On 05/15/2012 04:56 PM, Paolo Carlini wrote: @@ -2753,7 +2754,8 @@ build_x_indirect_ref (location_t loc, tree expr, r rval = cp_build_indirect_ref (expr, errorstring, complain); if (processing_template_decl rval != error_mark_node) -

Go patch committed: Fix taking address of constant outside function

2012-05-15 Thread Ian Lance Taylor
This patch to the Go frontend extends the code I committed earlier today for taking the address of a constant to work outside of a function. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.7 branch. Ian diff -r f37debbb3806 go/expressions.cc ---

Merge from gcc-4_7-branch to gccgo branch

2012-05-15 Thread Ian Lance Taylor
I have done yet another merge from gcc-4_7-branch to gccgo branch, this time from revision 187566. Ian

Re: Turn check macros into functions. (issue6188088)

2012-05-15 Thread Diego Novillo
On 12-05-15 13:19 , Lawrence Crowl wrote: The gcc source uses several constructs that GDB does not understand. This patch corrects some of them. It affects only compilers built with ENABLE_TREE_CHECKING, and hence release compilers are unaffected. In particular, I change the implementation of

Re: [C++ Patch] PR 44516

2012-05-15 Thread Jason Merrill
On 05/15/2012 06:44 PM, Paolo Carlini wrote: I can't change the build_min_non_dep_loc call in build_x_binary_op to simply use loc, that causes the diagnostic regression I mentioned before. Sorry, I wasn't clear in my previous message, it happens when one naturally just passes loc, not the

Re: [Patch / RFC] PR 39681

2012-05-15 Thread Jason Merrill
OK. Jason

  1   2   >