Re: [Patch, fortran] PR51870 - [OOP] ICE with ALLOCATE and SOURCE-expr function returning BT_CLASS

2012-01-23 Thread Paul Richard Thomas
Dear Tobias, I believe that you mean source-expr (i.e. SOURCE= and MOLD=) and not STATUS. It was late when I wrote the mail :-) I somehow liked your draft patch more: It caused regressions, though! * The big program which I reduced to the test case in PR 51870 fails with the current

[Ada] Aliased view of a type in various Ada dialects

2012-01-23 Thread Arnaud Charlet
This patch corrects the detection of a proper aliased view of a type in the context of attributes Access and Unchecked_Access. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-01-23 Hristian Kirtchev kirtc...@adacore.com * freeze.adb (Check_Current_Instance): Issue an

[Patch testsuite] Fix vec_interleave and vec_extract_even_odd to fall back to vec_perm

2012-01-23 Thread Ramana Radhakrishnan
Hi, Now that we have vec_perm support, vec_interleave and vec_extract_even_odd should fall out from that rather than having to handle an additional target in each of these. This fixes gcc.dg/vect/slp-11a.c for ARM Neon testing with no other regressions in gcc.dg/vect Ok ? cheers Ramana

[Ada] Redundant apostrophes in error messages

2012-01-23 Thread Arnaud Charlet
Some error messages contain the string with'ed, but actually the apostrophe has special meaning for Errout (it means escape the next character), so it is not displayed. In order to minimize change in compiler output, this change removes the unnecessary, and ineffective, apostrophes. No visible

[Ada] Deal with empty input in __gnat_decode

2012-01-23 Thread Arnaud Charlet
This patch adds early processing of an empty input name to __gnat_decode, the Ada demangler used by our traceback symbolization engines. Empty inputs are allowed by the spec, and are actually issued for unresolved traceback addresses (for which we haven't found a matching symbol name) as of

[Ada] Improvement to errors and warning messages for expanded names

2012-01-23 Thread Arnaud Charlet
This change modifies the way expanded_names are reported in error messages: the full expanded name, in source form, is now quoted, rather than just its terminal Selector_Name. The following compilation must produce the shown warning message, including the full name 'Ada.Calendar': $ gcc -c

[Ada] Refactoring of Ada.Text_IO.Put

2012-01-23 Thread Arnaud Charlet
This change reorganizes code to avoid gratuitous duplication. No behaviour change, no test. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-01-23 Thomas Quinot qui...@adacore.com * a-textio.adb (Put): Rewrite one-parameter Character version to just call the

[Ada] Handle compilation unit specific restrictions for subunits

2012-01-23 Thread Arnaud Charlet
This patch corrects two problems introduced by the previous patch to handle compilation unit specific restrictions. First if a subunit is compiled on its own, it does not pick up compilation unit specific restrictions from a configuration pragma file. Seccond, if such restrictions appear in the

[Ada] Implementation of aspect Synchronization

2012-01-23 Thread Arnaud Charlet
Aspect Synchronization was introduced in Ada 2012 (AI05-215), to provide an aspect specification for the previously defined pragma Implemented, introduced in AI05-030. These two equivalent forms control requeue on a synchronized interface. This patch implements the aspect version. Tested on

Re: Bug store_bit_field_1 + patch

2012-01-23 Thread Aurelien Buhrig
Le 21/01/2012 03:37, Alan Modra a écrit : The problem occurs when value is a REG and bitsize BITS_PER_WORD. This is because wordnum, which is used to get the subword of value, is incorrectly computed, in BIG_ENDIAN, wrt the number of words needed by bitsize instead of the number of words

Re: [RFC combine] PR48308 - Fix issue with missing(?) LOG_LINKS

2012-01-23 Thread Ramana Radhakrishnan
On 22 January 2012 10:53, Eric Botcazou ebotca...@adacore.com wrote: The un-combining thing around line 2800 is somewhat of a kludge and I wouldn't be surprised if there were other fallouts.  But your change is clearly correct and looks relatively safe, so OK for trunk and 4.6 branch after

[Ada] New line for each entry for pg/po/ps in Sprint

2012-01-23 Thread Arnaud Charlet
This patch ensures that output from the Sprint debugging routines pg/ps/po has each element starting on a new line, for greater convenience in debug output. This affects only internal debugging of the compiler itself, so no test is needed. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Performance of UTC_Time_Offset on Windows

2012-01-23 Thread Arnaud Charlet
This patch changes the behavior of Split and Time_Of with respect to historic time zones. The two routines no longer attempt to determine the UTC offset of the input date as it occurred at that point in time. Instead, Split and Time_Of use the current UTC offset of the now. The patch also

[Ada] Ada 2012 aspect Synchronization

2012-01-23 Thread Arnaud Charlet
This patch adds some minor missing support for aspect Synchronization which is later transformed into pragma Implemented by the expander. -- Source -- -- checks.ads package Checks is type Synch_Iface is synchronized interface; procedure With_Entry (Obj :

[PATCH] Fix up -free (PR rtl-optimization/51933)

2012-01-23 Thread Jakub Jelinek
Hi! The following testcase as well as the PR51924 testcase show that it is a really bad idea to rely on the UD/DU DF links in the ree pass if we keep removing them while the pass goes on, and just assume that the insns feeding the now removed UD links have been properly adjusted and are suitable

Re: [RFC combine] PR48308 - Fix issue with missing(?) LOG_LINKS

2012-01-23 Thread Eric Botcazou
Do you mean something like this instead ? I'm testing this - Ok if no regressions ? OK with an appropriate ChangeLog. -- Eric Botcazou

Re: [Patch testsuite] Fix vec_interleave and vec_extract_even_odd to fall back to vec_perm

2012-01-23 Thread Jakub Jelinek
On Mon, Jan 23, 2012 at 08:30:46AM +, Ramana Radhakrishnan wrote: Now that we have vec_perm support, vec_interleave and vec_extract_even_odd should fall out from that rather than having to handle an additional target in each of these. This fixes gcc.dg/vect/slp-11a.c for ARM Neon testing

Re: [PATCH] Fix up -free (PR rtl-optimization/51933)

2012-01-23 Thread Eric Botcazou
This patch fixes this by using DF_DEFER_INSN_RESCAN, so we keep the UD/DU links for the whole duration of the pass, this pass doesn't add new instructions, only changes them (and schedules insns for removal, but that is done as the last step for all to be deleted insns at once). Thus we don't

Re: FIX PR51926, libstdc++ iterator store bigendian bitfield related

2012-01-23 Thread Alan Modra
On Sat, Jan 21, 2012 at 11:07:10AM +1030, Alan Modra wrote: PR middle-end/51926 * expmed.c (store_bit_field_1): Properly handle last word of BLKmode value when bigendian. Blah, I was working on an old tree. The bug is already fixed. -- Alan Modra Australia Development Lab,

[Ada] SCOs for disabled pragmas

2012-01-23 Thread Arnaud Charlet
SCOs for disabled pragma statements (Assert or Debug) should be output with a marker indicating that they are disabled, rather than suppresed, because references to them can appear in dominance markers for subsequent statement sequences. In the following compilation, the dominance marker must

[Ada] issue in ASIS with aspects

2012-01-23 Thread Arnaud Charlet
Generation of analysis information for precondition and postcondition boolean expressions appearing in the spec of a generic subprogram declaration in ASIS mode. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-01-23 Vincent Pucci pu...@adacore.com * sem_ch12.adb

Re: [PING] Re: [PATCH, Ada] Illegal program not detected, self renames, PR15846

2012-01-23 Thread Arnaud Charlet
Could you please review this patch: http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00581.html This patch fixes problem when gnat is not able to detect illegal program with self renaming of predefined operation, when renaming operation is defined with selected component of the same package

[PATCH] Fix IPA-SRA creating BLKmode sub-params (PR51895)

2012-01-23 Thread Richard Guenther
This fixes the IPA-SRA sub-optimality discovered in PR51895. We should avoid decomposing anything into BLKmode components if the original param wasn't already BLKmode. Bootstrap and regtest pending on x86_64-unknown-linux-gnu. Richard. 2012-01-23 Richard Guenther rguent...@suse.de

[Ada] Use a proper assertion in Vet instead of a comment

2012-01-23 Thread Arnaud Charlet
Vet checks container invariants to determine whether a cursor is dangling. Some program state had been described using comments at various points. The comments have been replaced by instances of pragma Assert. Some comments were also added to describe the purpose of Vet and how the mechanism for

[PATCH] Fix PR51949

2012-01-23 Thread Richard Guenther
We ICE when splitting part of a function which has the malloc attribute and that part does not return. While the issue is more general (transfering attributes to a part/clone) we can address this probably common issue with the following simple patch. Richard. 2012-01-23 Richard Guenther

Re: Partial fix for LTO bootstrap with Ada

2012-01-23 Thread Richard Guenther
On Sun, Jan 22, 2012 at 3:42 PM, Eric Botcazou ebotca...@adacore.com wrote: The LTO bootstrap of the Ada compiler is currently plagued by at least three different problems.  The attached patch is for the easy one: it prevents fake variables whose type contains a placeholder from being created,

Re: Fix flag_trapping_math in java frontend

2012-01-23 Thread Richard Guenther
On Sun, Jan 22, 2012 at 3:52 PM, Andreas Schwab sch...@linux-m68k.org wrote: The java frontend wants that floating point operations are assumed to never trap, thus clears flag_trapping_math in java_init_options_struct. But this is no longer effective after revision 165823, because

Re: [ C frontend ] add support for builtins that take signed and unsigned md types

2012-01-23 Thread Richard Guenther
On Sun, Jan 22, 2012 at 8:04 PM, Mike Stump mikest...@comcast.net wrote: On Jan 22, 2012, at 4:53 AM, Richard Guenther wrote: Why add a new loop?  It seems to be bogus to not check signedness in the existing loop (mind that for fixed-point types you need to check saturating/nonsaturating

Re: [patch PR 51900]: Fix PE's delegitimize_address functions

2012-01-23 Thread Richard Guenther
On Sun, Jan 22, 2012 at 8:05 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this patch fixes reported issue in PR about common-symbols and fix behavior about -fcommon/-fno-common.  Additionally it adds proper support for weakref, local-variant of weaks, and tries to handle

Re: Add -lssp_nonshared to LINK_SSP_SPEC

2012-01-23 Thread Richard Guenther
On Mon, Jan 23, 2012 at 12:23 AM, Gerald Pfeifer ger...@pfeifer.com wrote: On Sat, 21 Jan 2012, Tijl Coosemans wrote: I've been using this patch now. It's similar to the above url, but conditional on TARGET_LIBC_PROVIDES_SSP to support older FreeBSD versions. Gerald volunteered to commit.

Re: [PATCH] Fix PR 29333: Jump threading getting in the way of PHI-OPT

2012-01-23 Thread Richard Guenther
On Mon, Jan 23, 2012 at 6:33 AM, Andrew Pinski andrew.pin...@caviumnetworks.com wrote: Hi,  The problem here is not really jump threading getting in the way of PHI-OPT rather there is no cleanup of the IR after jump thread but before phi-opt. This patch adds a pass_phi_only_cprop right after

Re: [patch PR 51900]: Fix PE's delegitimize_address functions

2012-01-23 Thread Kai Tietz
2012/1/23 Richard Guenther richard.guent...@gmail.com: On Sun, Jan 22, 2012 at 8:05 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this patch fixes reported issue in PR about common-symbols and fix behavior about -fcommon/-fno-common.  Additionally it adds proper support for weakref,

Re: [patch PR 51900]: Fix PE's delegitimize_address functions

2012-01-23 Thread Jakub Jelinek
On Sun, Jan 22, 2012 at 09:24:47PM +0100, Kai Tietz wrote: 2012-01-22 Kai Tietz kti...@redhat.com PR target/51900 * dwarf2out.c (const_ok_for_output_1): Try to delegitimize address before checking for UNSPEC. Why is the dwarf2out.c change needed at all? dwarf2out.c

Re: [patch PR 51900]: Fix PE's delegitimize_address functions

2012-01-23 Thread Richard Guenther
On Mon, Jan 23, 2012 at 12:19 PM, Kai Tietz ktiet...@googlemail.com wrote: 2012/1/23 Richard Guenther richard.guent...@gmail.com: On Sun, Jan 22, 2012 at 8:05 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this patch fixes reported issue in PR about common-symbols and fix behavior about

Re: [patch PR 51900]: Fix PE's delegitimize_address functions

2012-01-23 Thread Kai Tietz
2012/1/23 Jakub Jelinek ja...@redhat.com: On Sun, Jan 22, 2012 at 09:24:47PM +0100, Kai Tietz wrote: 2012-01-22  Kai Tietz  kti...@redhat.com       PR target/51900       * dwarf2out.c (const_ok_for_output_1): Try to delegitimize       address before checking for UNSPEC. Why is the

Re: FW: patch to fix PR21617

2012-01-23 Thread Igor Zamyatin
Unfortunately patch doesn't help neither for separate EEMBC_2_0 tests nor for the whole benchmark. Do you want me to do some debugging here? On Fri, Jan 20, 2012 at 10:13 PM, Vladimir Makarov vmaka...@redhat.com wrote: On 01/19/2012 03:52 PM, Vladimir Makarov wrote: On 01/18/2012 02:30 PM,

Re: [patch PR 51900]: Fix PE's delegitimize_address functions

2012-01-23 Thread Kai Tietz
2012/1/23 Richard Guenther richard.guent...@gmail.com: On Mon, Jan 23, 2012 at 12:19 PM, Kai Tietz ktiet...@googlemail.com wrote: 2012/1/23 Richard Guenther richard.guent...@gmail.com: On Sun, Jan 22, 2012 at 8:05 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this patch fixes reported

[PATCH][1/n] Fix PR50444, handle unaligned VIEW_CONVERT_EXPRs during expansion

2012-01-23 Thread Richard Guenther
The VIEW_CONVERT_EXPR expansion path fails to handle the case where we promote alignment for !STRICT_ALIGNMENT targets but for modes that are supposed to be handled by movmisalign. This is exposed in gcc.dg/torture/pr45678-2.c on i?86 when you apply the candidate patch for PR50444 in comment

Re: [patch PR 51900]: Fix PE's delegitimize_address functions

2012-01-23 Thread Richard Guenther
On Mon, Jan 23, 2012 at 2:11 PM, Kai Tietz ktiet...@googlemail.com wrote: So revised patch with removing dwarf2out.c changes and using default_binds_local_p_1 in  i386_pe_binds_local_p.  The dwarf2out change isn't anymore necessary.  It seems that fix of PR/45682 fixed this issue, too.

[Patch,AVR,doc]: Fix some typos, add example.

2012-01-23 Thread Georg-Johann Lay
Besides fixing some typos, this patch adds an example that shows how to access code located with attribute progmem. The example in AVR named address spaces is moved up and the note on offset limitation is removed. Ok to apply? Johann PR target/49868 * doc/extend.texi (AVR Named

Re: [PATCH] PR51280 LTO/trans-mem ICE with TM builtins

2012-01-23 Thread Aldy Hernandez
PR lto/51916 * lto-object.c (LTO_SEGMENT_NAME): Define segment name. (lto_obj_file_open): Use it. Patrick, the changelog was referring to the wrong file and the wrong function. I've fixed it. I also inlined the segment name, as Ian had in the PR. Richard Guenther approved the patch on

[PATCH] PR testsuite/51941 - FAIL g++.dg/debug/dwarf2/nested-3.C on

2012-01-23 Thread Dodji Seketeli
Hello, The test of the patch doesn't pass on x86_64-apple-dwarwin10 because the DWARF asm output has an extra line: .set L$set$31,LASF0-Lsection__debug_str before the DW_AT_name: Executor line, as in: .byte 0x8 # uleb128 0x8; (DIE (0x92) DW_TAG_namespace) .ascii

Re: [PATCH] PR testsuite/51941 - FAIL g++.dg/debug/dwarf2/nested-3.C on

2012-01-23 Thread Jason Merrill
OK. Jason

[Patch, Fortran] PR 51948 - Fix variable check for MOVE_ALLOC

2012-01-23 Thread Tobias Burnus
Dear all, the variable_check() failed when one had multiple nested blocks. I think it worked in 4.5 because that was before PR 46484 got fixed in 4.6. The issue that PR fixed was that the non-variableness of f in sub (see below) was not diagnosed. The problem is that the symbol tree is

Re: Continue strict-volatile-bitfields fixes

2012-01-23 Thread Bernd Schmidt
On 11/29/2011 05:35 PM, Mitchell, Mark wrote: So, I still think this patch is the best way to go forward, and it does fix incorrect code generation. Would appreciate an OK. Ping. If you don't hear any objections within a week, please proceed. That was committed a while ago. The part in

Re: [PATCH][1/n] Fix PR50444, handle unaligned VIEW_CONVERT_EXPRs during expansion

2012-01-23 Thread Richard Guenther
On Mon, 23 Jan 2012, Richard Guenther wrote: The VIEW_CONVERT_EXPR expansion path fails to handle the case where we promote alignment for !STRICT_ALIGNMENT targets but for modes that are supposed to be handled by movmisalign. This is exposed in gcc.dg/torture/pr45678-2.c on i?86 when you

Re: [RFC combine] PR48308 - Fix issue with missing(?) LOG_LINKS

2012-01-23 Thread Ramana Radhakrishnan
On 23 January 2012 09:02, Eric Botcazou ebotca...@adacore.com wrote: Do you mean something like this instead ? I'm testing this - Ok if no regressions ? OK with an appropriate ChangeLog. Or not :( We really shouldn't use SUBST there as it only deals with rtx * It appeared better to invent a

Re: [patch PR 51900]: Fix PE's delegitimize_address functions

2012-01-23 Thread Richard Henderson
On 01/24/2012 12:11 AM, Kai Tietz wrote: 2012-01-23 Kai Tietz kti...@redhat.com PR target/51900 * config/i386/predicates.md (symbolic_operand): Allow UNSPEC_PCREL as PIC expression for lea. * config/i386/winnt.c (i386_pe_binds_local_p): Reworked. *

Re: [Patch testsuite] Fix vec_interleave and vec_extract_even_odd to fall back to vec_perm

2012-01-23 Thread Ramana Radhakrishnan
On 23 January 2012 09:15, Jakub Jelinek ja...@redhat.com wrote: On Mon, Jan 23, 2012 at 08:30:46AM +, Ramana Radhakrishnan wrote: Now that we have vec_perm support, vec_interleave and vec_extract_even_odd should fall out from that rather than having to handle an additional target in each

C++ PATCH for c++/51925 (ICE with using in template)

2012-01-23 Thread Jason Merrill
The problem in this case was that a few places in the compiler were assuming that when we have an OVERLOAD, all the functions within it come from the same context. But that isn't the case when we have using-declarations involved, so we need to take them into account. Tested

Re: Fix regression on PR46590 (slow compile with -O0)

2012-01-23 Thread Michael Matz
Hi, On Sat, 21 Jan 2012, Eric Botcazou wrote: Trivially fixing the thinko (iterating over (work bit-and old_conflict) in the first inner loop) would fix the testcase but in general create too few conflicts, i.e. generate wrong code. I need some time to think about this again. OK,

Re: [ C frontend ] add support for builtins that take signed and unsigned md types

2012-01-23 Thread Mike Stump
On Jan 23, 2012, at 3:00 AM, Richard Guenther wrote: So, yes, please have only one loop. Updated patch included. Ok? gcc-1.diffs.patch Description: Binary data

[C++ Patch] PR 51398

2012-01-23 Thread Paolo Carlini
Hi, a small diagnostic regression. Normally, when we do 'TREE_VALUE (TREE_VEC_ELT (*parms' we check for error_mark_node, because that's what we store for erroneous parameters: doing that here too avoids the ICE. Tested x86_64-linux. Thanks, Paolo. / /cp

[patch] fix TM clone drops at LTO time

2012-01-23 Thread Aldy Hernandez
While working on PR51698, I've noticed the LTO/TM rabbit hole goes much deeper. The compiler is dropping transactional clones with -flto because the externally_visible bit is unset for clones. This is so because cgraph_copy_node_for_versioning unconditionally zaps it. I have fixed the TM

Re: [C++ Patch] PR 51398

2012-01-23 Thread Jason Merrill
OK. Jason

Re: [patch] fix TM clone drops at LTO time

2012-01-23 Thread Richard Henderson
On 01/24/2012 04:16 AM, Aldy Hernandez wrote: * trans-mem.c (ipa_tm_create_version): Set externally_visible. (ipa_tm_create_version_alias): Same. Ok. r~

[v3] Don't XFAIL 22_locale/num_put/put/*char/14220.cc on 32-bit Solaris 10/x86

2012-01-23 Thread Rainer Orth
I'm currently seeing two XPASSes in 32-bit Solaris 10/x86 libstdc++ testresults: XPASS: 22_locale/num_put/put/char/14220.cc execution test XPASS: 22_locale/num_put/put/wchar_t/14220.cc execution test It turned out that the libc bug which caused those tests to be xfailed has been fixed in Solaris

[Patch ARM ] Fix testism for PR45416 on ARM.

2012-01-23 Thread Ramana Radhakrishnan
Hi, This fixes a failure that I see while running the tests for v7a- because we don't handle ubfx. Also, this test is valid for arm32 configurations. Committed to trunk . cheers Ramana 2012-01-23 Ramana Radhakrishnan ramana.radhakrish...@linaro.org PR middle-end/45416 *

RFA: cgraph PATCH for c++/51812 (link failure with undefined/unneeded virtual function)

2012-01-23 Thread Jason Merrill
In this testcase, main doesn't call anything, so the inline functions in the classes can be optimized away, and we don't need the vtables or the virtual functions they refer to. But cgraph_decide_is_function_needed wants to write out all static functions at -O0, which in this case was

[PATCH] Fix expansion of BLKmode MEM_REF with non-addressable non-BLKmode base decl (PR middle-end/51895)

2012-01-23 Thread Jakub Jelinek
Hi! Now that Richi has fixed up SRA not to pessimize code by changing non-BLK mode arguments into their BLKmode subparts, I think it would be nice to fix up also the expansion of the BLKmode MEM_REFs that have non-BLKmode non-addressable base decl. While this doesn't happen for this testcase

[PATCH] Fix up ppc64-linux profiledbootstrap - .toc section references in .debug_loc (PR target/51957)

2012-01-23 Thread Jakub Jelinek
Hi! profiledbootstrap currently fails on powerpc64-linux (64-bit). The problem is that the linker errors on .toc section references from within non-allocated sections. Alan changed the linker some months ago to not die with assertion failure, but error out on these, and the attached testcase

[testsuite] Avoid assuming argc != 0

2012-01-23 Thread Richard Sandiford
gcc.c-torture/execute/scal-to-vec1.c uses argc as an easy way of injecting a runtime value into a constructor. The test goes on to do divide by this value, so it cannot be zero. This causes problems on embedded targets that don't provide a command line, and that instead set argc to 0. One fix

Re: [testsuite] Avoid assuming argc != 0

2012-01-23 Thread Mike Stump
On Jan 23, 2012, at 11:13 AM, Richard Sandiford wrote: One fix is attached. Another would be to read from a volatile variable that has been initialised to 1. Other possibilities exist too of course. Tested on mipsisa64-elf. OK to install? Ok. I have a preference for volatile (clearer

RFA: fix PR 51649

2012-01-23 Thread Tom Tromey
This patch fixes some pretty-printer bugs pointed out in PR 51649. The bug in the PR is that the pretty-printers don't work if you build with --enable-symvers=gnu-versioned-namespace. This patch adds test cases for all the changes I made. I derived most of the information here from reading

Re: [PATCH] Fix up ppc64-linux profiledbootstrap - .toc section references in .debug_loc (PR target/51957)

2012-01-23 Thread Jason Merrill
OK. Jason

Re: Continue strict-volatile-bitfields fixes

2012-01-23 Thread DJ Delorie
and I think applying strict-volatile-bitfields to enums is probably meaningless. MCU vendors would disagree. If a location is volatile, it's most likely hardware, and must be accessed in the user-specified way. Randomly accessing adjacent locations could cause system failure.

Re: [RFC combine] PR48308 - Fix issue with missing(?) LOG_LINKS

2012-01-23 Thread Eric Botcazou
Or not :( We really shouldn't use SUBST there as it only deals with rtx * It appeared better to invent a new SUBST for links given that the type of this expression is struct insn_link rather than rtx * (Doh !) I did think about hacking up a local flag but somehow like this version better.

[PATCH] Shrink .debug_ranges section by ~22.5% (PR debug/51902)

2012-01-23 Thread Jakub Jelinek
Hi! This patch shrinks .debug_ranges section in cc1plus (and probably most of other binaries) by ~ 22.5% by removing redundancies in the ranges. If say a lexical block or inlined subroutine covers the same instruction as its supercontext scope, they can share .debug_range offsets instead of

Re: [PATCH, Ada] Illegal program not detected, self renames, PR15846

2012-01-23 Thread Arnaud Charlet
ChangeLog: * gcc/ada/exp_disp.adb (Make_DT): Check if flag Is_Dispatching_Operation is True before getting DT_Position flag , present in function and procedure entities which are dispatching * gcc/ada/sem_ch8.adb

Re: [Patch, Fortran] PR 51948 - Fix variable check for MOVE_ALLOC

2012-01-23 Thread Paul Richard Thomas
Dear Tobias, Build and regtested on x86-64-linux. OK for the trunk and for the 4.6 branch? OK for trunk Thanks for the patch! Paul

C++ PATCH for c++/51930 (instantiation hidden despite visibility attribute)

2012-01-23 Thread Jason Merrill
DECL_VISIBILITY_SPECIFIED is set if the decl occurs after a #pragma visibility or within a namespace with explicit visibility. In these cases, we want the visibility of template arguments to be able to further restrict the visibility of template specializations. But if the specialization

RE: [Patch,AVR,doc]: Fix some typos, add example.

2012-01-23 Thread Weddington, Eric
-Original Message- From: Georg-Johann Lay Sent: Monday, January 23, 2012 5:35 AM To: gcc-patches@gcc.gnu.org Cc: Weddington, Eric; Denis Chertykov Subject: [Patch,AVR,doc]: Fix some typos, add example. Besides fixing some typos, this patch adds an example that shows how to

Re: Comdat-aware code coverage data

2012-01-23 Thread Nathan Sidwell
On 01/20/12 22:41, Xinliang David Li wrote: Nathan, I just noticed this path. This is a good improvement over the existing scheme. I see one potential problem with the patch -- different instances of the same comdat function can potentially have different control flows (due to differences in

Re: [PATCH, Ada] Illegal program not detected, self renames, PR15846

2012-01-23 Thread Alexander Basov
24.01.2012 00:11, Arnaud Charlet пишет: ChangeLog: * gcc/ada/exp_disp.adb (Make_DT): Check if flag Is_Dispatching_Operation is True before getting DT_Position flag , present in function and procedure entities which are dispatching *

[PATCH] Fix for PR51879 - Missed tail merging with non-const/pure calls

2012-01-23 Thread Tom de Vries
Richard, Jakub, the following patch fixes PR51879. Consider the following test-case: ... int bar (int); void baz (int); void foo (int y) { int a; if (y == 6) a = bar (7); else a = bar (7); baz (a); } ... after compiling at -02, the representation looks like this before

Re: Continue strict-volatile-bitfields fixes

2012-01-23 Thread Bernd Schmidt
On 01/23/2012 08:51 PM, DJ Delorie wrote: and I think applying strict-volatile-bitfields to enums is probably meaningless. MCU vendors would disagree. If a location is volatile, it's most likely hardware, and must be accessed in the user-specified way. Randomly accessing adjacent

Re: Comdat-aware code coverage data

2012-01-23 Thread Xinliang David Li
On Mon, Jan 23, 2012 at 12:52 PM, Nathan Sidwell nat...@acm.org wrote: On 01/20/12 22:41, Xinliang David Li wrote: Nathan, I just noticed this path. This is a good improvement over the existing scheme. I see one potential problem with the patch -- different instances of the same comdat

[trans-mem] Do not instrument thread locals

2012-01-23 Thread Patrick Marlier
Hi, I found that all thread local variables are instrumented with _ITM_W/R* calls whereas they should not be shared with other threads. This patch takes care of thread locals into requires_barrier and also adds the local save/restore for them. This patch also includes a testcase. I did not

[v3] libstdc++/49829

2012-01-23 Thread Benjamin Kosnik
This modularizes the libstdc++ sources such that the resulting library binaries are now composed of three convenience libraries. In short: libstdc++.[a, so] == libc++98 + libc++11 + libsupc++ Arguably, this is the way it should have been done all along. And certainly since the C++11 support hit

Go patch committed: Error if variable defined but not used

2012-01-23 Thread Ian Lance Taylor
In Go it is an error if a variable is defined but not used. This patch implements this error in gccgo. This required some tweaks to gccgo specific changes in libgo. It also required updating various tests in the testsuite. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.

MAINTAINERS file diff after adding myself

2012-01-23 Thread Harshit Chopra
Index: MAINTAINERS === --- MAINTAINERS (revision 183449) +++ MAINTAINERS (working copy) @@ -336,6 +336,7 @@  Gabriel Charette                               gch...@google.com  Chandra Chavva                                

[PATCH, libitm]: Optimize x86_64 gtm_jmpbuf layout

2012-01-23 Thread Uros Bizjak
Hello! Attached patch optimizes x86_64 gtm_jmpbuf layout to avoid copying return address. Optimized layout uses the same trick as x86_32 - call used registers are saved just below return address. And there is just enough space in the call alignment hole to put all of them there. 2012-01-24 Uros

[C++ Patch] PR 51223

2012-01-23 Thread Paolo Carlini
Hi, another diagnostic regression, a little subtler than the last one. In this case, besides the final ICE (which was already there in 4.5), we also have a regression vs 4.6 in the error messages produced before it, that is, we have (see PR): bug.cc:3:18: error: 'i' has incomplete type

Re: [PATCH, libitm]: Optimize x86_64 gtm_jmpbuf layout

2012-01-23 Thread Richard Henderson
On 01/24/2012 11:05 AM, Uros Bizjak wrote: Hello! Attached patch optimizes x86_64 gtm_jmpbuf layout to avoid copying return address. Optimized layout uses the same trick as x86_32 - call used registers are saved just below return address. And there is just enough space in the call alignment

[trans-mem,c++] PR51928

2012-01-23 Thread Patrick Marlier
Hi, In this PR51928, it tries to look_for_tm_attr_overrides on a thunk but there is no DECL_NAME for thunk. So it fails in lookup_fnfields_idx_nolazy because name is NULL. #0 0x00764b5a in lookup_fnfields_idx_nolazy (type=0x769f77e0, name=0x0) at

Re: [C++ Patch] PR 51223

2012-01-23 Thread Jason Merrill
OK. Jason

Re: [trans-mem,c++] PR51928

2012-01-23 Thread Jason Merrill
OK. Jason

Re: [PATCH] Fix up ppc64-linux profiledbootstrap - .toc section references in .debug_loc (PR target/51957)

2012-01-23 Thread David Edelsohn
On Mon, Jan 23, 2012 at 1:29 PM, Jakub Jelinek ja...@redhat.com wrote: profiledbootstrap currently fails on powerpc64-linux (64-bit).  The problem is that the linker errors on .toc section references from within non-allocated sections.  Alan changed the linker some months ago to not die with

Re: [PATCH] Fix up ppc64-linux profiledbootstrap - .toc section references in .debug_loc (PR target/51957)

2012-01-23 Thread Alan Modra
On Mon, Jan 23, 2012 at 07:29:18PM +0100, Jakub Jelinek wrote: can hit it in some cases. The problem here is that var-tracking.c (adjust_insn) isn't able to delegitimize it, because the UNSPEC_TOCREL isn't added there to r2 register, but to a debug_expr (which only afterwards is found to

[patch] Fix mismatched #pragma GCC visibility

2012-01-23 Thread Rafael Ávila de Espíndola
While trying to improve clang's handling of #pragma GCC visibility I found out that libstdc++-v3/libsupc++/typeinfo looks like #pragma GCC visibility push(default) extern C++ { #pragma GCC visibility pop } Is that supposed to work or just happens to? If desired, the attached patch moves the pop

Re: [v3] libstdc++/49829

2012-01-23 Thread Benjamin Kosnik
tested x86-64/linux tested x86-64/linux -x- arm-eabi tested x86-64/linux -x- cris-elf Here is the missing bit, as tested above. -benjamindiff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index aa25a7e..87b2a16 100644 --- a/libstdc++-v3/src/Makefile.am +++

[PATCH] Improve PHI-OPT when there are multiple phis

2012-01-23 Thread Andrew Pinski
Hi, Right now PHI-OPT does try to handle the case where we have multiple PHIs but the other PHIs have the same value for the edges we care about. This fixes the issue and allows PHI-OPT to handle a few more cases and it removes the TODO in the comments. OK For 4.8? Bootstrapped and tested on

Go patch committed: Better error for invalid use of builtin

2012-01-23 Thread Ian Lance Taylor
This patch to the Go compiler improves the error message for the invalid use of a special builtin function like unsafe.Sizeof. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r c1acc6a7e12a go/expressions.cc --- a/go/expressions.cc Mon Jan 23

Re: [trans-mem] Do not instrument thread locals

2012-01-23 Thread Richard Henderson
On 01/24/2012 09:59 AM, Patrick Marlier wrote: 2012-01-23 Patrick Marlier patrick.marl...@gmail.com * trans-mem.c (requires_barrier): Do not instrument thread local variables and emit save/restore for them. testsuite/ChangeLog 2012-01-23 Patrick Marlier

Re: [PATCH] Fix up ppc64-linux profiledbootstrap - .toc section references in .debug_loc (PR target/51957)

2012-01-23 Thread Jakub Jelinek
On Tue, Jan 24, 2012 at 01:45:40PM +1030, Alan Modra wrote: On Mon, Jan 23, 2012 at 07:29:18PM +0100, Jakub Jelinek wrote: can hit it in some cases. The problem here is that var-tracking.c (adjust_insn) isn't able to delegitimize it, because the UNSPEC_TOCREL isn't added there to r2

Re: [PATCH, Ada] Illegal program not detected, self renames, PR15846

2012-01-23 Thread Arnaud Charlet
The patch for exp_disp is related to renaming of predefined = operation for tagged type. without this patch I've got ICE on the following testcase: OK, we have a better, simpler patch for this issue, no need for this hunk. For the record, here is the patch we're looking at: Modified: