C++ PATCH for c++/48993 (ICE with constexpr ctor)

2011-08-05 Thread Jason Merrill
This bug is related to 48089: as there, we can't use 'this' in a constructor because it doesn't refer to anything yet. And as with 48089, this isn't a complete fix; we currently just sorry rather than try to separate the well-formed cases from the ill-formed. Tested x86_64-pc-linux-gnu, apply

C++ PATCH for c++/49221 (ICE with decltype of ->*)

2011-08-05 Thread Jason Merrill
5.5 says, "If the result of .* or ->* is a function, then that result can be used only as the operand for the function call operator ()." We need to enforce that in finish_decltype_type. Tested x86_64-pc-linux-gnu, applying to trunk and 4.6. commit b5a38c10b1755e85d931c05b9b5f85b348d0eb94 Autho

C++ PATCH for c++/49669 (ICE on invalid array init)

2011-08-05 Thread Jason Merrill
Just fail more gracefully. Tested x86_64-pc-linux-gnu, applying to trunk and 4.6. commit a9c72513517e8b5cbf3128cb89994eae59961ade Author: Jason Merrill Date: Fri Aug 5 16:51:08 2011 -0400 PR c++/49669 * init.c (perform_member_init): Handle invalid array initializer. diff --git a/gc

C++ PATCH for c++/49988 (constexpr causing wrong code)

2011-08-05 Thread Jason Merrill
The constexpr on the A constructor led us to try to expand the call in the B constructor to a constant. But in that call we're passing the B parameter s, which is not constant, so it should just fail quietly. But instead we were trying to treat it as a STRING_CST, which causes an ICE with che

Re: [trans-mem] Move state from gtm_thread to gtm_transaction

2011-08-05 Thread Torvald Riegel
On Thu, 2011-08-04 at 12:35 -0700, Richard Henderson wrote: > On 08/04/2011 12:24 PM, Torvald Riegel wrote: > > On Thu, 2011-08-04 at 11:55 -0700, Richard Henderson wrote: > >> On 08/04/2011 09:22 AM, Torvald Riegel wrote: > >>> On Thu, 2011-08-04 at 08:43 -0700, Richard Henderson wrote: > On

[trans-mem] Removed gtm_thread and threadnum. Renamed gtm_transaction to gtm_thread.

2011-08-05 Thread Torvald Riegel
Here is one try at cleaning up the gtm_transaction vs. gtm_thread confusion. As suggested off-list, gtm_transaction is renamed to gtm_thread. This makes up the largest part of the patch. _ITM_getThreadnum is not supported anymore. According to the ABI spec, its only purpose was to provide an ID th

[pph] Adding one hard and failing ordering test (issue4854042)

2011-08-05 Thread Gabriel Charette
This is the test I was talking would potentially fail with our current implementation. And it does. It has an assembly difference in the order of the global variables, like we used to have in simpler tests. Gab 2011-08-05 Gabriel Charette * (x0hardorder1.h): New. * (x3hard

PATCH: Add a testcase for PR target/47369

2011-08-05 Thread H.J. Lu
Hi, I checked in this patch to add a testcase for PR target/47369. H.J. --- Index: gcc.dg/pr47369-1.c === --- gcc.dg/pr47369-1.c (revision 0) +++ gcc.dg/pr47369-1.c (revision 0) @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-re

Re: PATCH: Add a testcase for PR middle-end/47364.

2011-08-05 Thread H.J. Lu
On Fri, Aug 5, 2011 at 3:10 PM, Andrew Pinski wrote: > On Fri, Aug 5, 2011 at 3:06 PM, H.J. Lu wrote: >> Hi, >> >> I checked in this patch to add a testcase for PR middle-end/47364. >> >> H.J. >> --- >> Index: gcc.target/i386/pr47364-1.c >>

Re: PATCH: Add a testcase for PR middle-end/47364.

2011-08-05 Thread H.J. Lu
On Fri, Aug 05, 2011 at 03:06:25PM -0700, H.J. Lu wrote: > Hi, > > I checked in this patch to add a testcase for PR middle-end/47364. > I also checked in 2 other testcases. H.J. --- Index: gcc.target/i386/pr47364-1.c === --- gcc.t

Re: PATCH: Add a testcase for PR middle-end/47364.

2011-08-05 Thread Andrew Pinski
On Fri, Aug 5, 2011 at 3:06 PM, H.J. Lu wrote: > Hi, > > I checked in this patch to add a testcase for PR middle-end/47364. > > H.J. > --- > Index: gcc.target/i386/pr47364-1.c > === > --- gcc.target/i386/pr47364-1.c (revision 0) > +++

PATCH: Add a testcase for PR middle-end/47364.

2011-08-05 Thread H.J. Lu
Hi, I checked in this patch to add a testcase for PR middle-end/47364. H.J. --- Index: gcc.target/i386/pr47364-1.c === --- gcc.target/i386/pr47364-1.c (revision 0) +++ gcc.target/i386/pr47364-1.c (revision 0) @@ -0,0 +1,12 @@ +/* { d

[PATCH, libiberty]: Check result of fwrite in test-expandargv.c

2011-08-05 Thread Uros Bizjak
Hello! My system warns during compilation of libiberty test-expandargv.c test: gcc -DHAVE_CONFIG_H -g -O2 -I.. -I../../../gcc-svn/trunk/libiberty/testsuite/../../include -DHAVE_CONFIG_H -I.. -o test-expandargv \ ../../../gcc-svn/trunk/libiberty/testsuite/test-expandargv.c ../libiberty.a

Re: [Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.

2011-08-05 Thread Mikael Morin
On Friday 05 August 2011 23:02:33 Thomas Koenig wrote: > > The extra > > argument controls whether we check variable symbols for equality or > > just their names. For the overriding checks it is sufficient to check > > for names, because the arguments of the overriding procedure are > > required to

Re: [patch] C6X unwinding/exception handling

2011-08-05 Thread Bernd Schmidt
On 08/04/11 16:31, Paul Brook wrote: > C6X uses an unwinding/exception handling echeme very similar to that defined > by the ARM EABI. The core of the unwinder is the same, so I've pulled it out > into a common file. > > Other than the obvious target specific bits, the main compiler visible >

Re: [Patch, Fortran] Coarrays: Add/fix check for no coarrays as result value

2011-08-05 Thread Mikael Morin
On Thursday 04 August 2011 17:00:46 Tobias Burnus wrote: > This patch fixes the result check for coarrays / variables with coarray > subcomponents. It was working with a separate RESULT() variable - but > not if the function name was the result variable. > > Build and regtested on x86-64-linux. >

[patch] fix bootstrap in libgcc for PowerPC FreeBSD

2011-08-05 Thread Andreas Tobler
Hi, the patch below survives bootstrap stage-1 on PowerPC FreeBSD successfully. W/o patch we try to fliter-out ibm-ldouble.c. So from my understanding the pattern ibm-ldouble.c does never match since there is a path prepended to the file name. With the patch we look for everything which contai

Re: [patch, fortran] PR 37721, warn about target > source in TRANSFER

2011-08-05 Thread Steve Kargl
On Fri, Aug 05, 2011 at 10:38:44PM +0200, Thomas Koenig wrote: > Hello world, > > the attached patch fixes PR 37721 by moving the check for TRANSFER size > mismatches to checking, away from simplification. That means that it is > possible to check character MOLDs whose size is constant, but whi

Fix ICE in remap_predicate

2011-08-05 Thread Jan Hubicka
Hi, the fortran testcase mismatches parameter count on inlined function and makes us to ICE on out of bounds array acces in remap_predicate. Fixed thus. Bootstrapped/regtested x86_64-linux, committed. PR middle-end/49494 * ipa-inline-analysis.c (remap_predicate): Add bounds check.

Re: [Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.

2011-08-05 Thread Thomas Koenig
Hi Janus, The patch is rather large, but most of it is just mechanical, due to the fact that I added an extra argument to 'gfc_dep_compare_expr'. I use this function to compare the string-length expressions of a character-valued TBP and an overriding procedure (the standard requires them to be e

Re: [pph] small multi-pph tests (issue4810074)

2011-08-05 Thread Gabriel Charette
I now get the following test failure output after pulling this patch (potentially from the almost concurrent checkin of my linetable patch?) I can send you my diff's if you need to compare. FAIL: g++.dg/pph/c4inline.cc (assembly comparison, sums 46031=>36250) FAIL: g++.dg/pph/x1keyed.cc (assemb

[patch, fortran] PR 37721, warn about target > source in TRANSFER

2011-08-05 Thread Thomas Koenig
Hello world, the attached patch fixes PR 37721 by moving the check for TRANSFER size mismatches to checking, away from simplification. That means that it is possible to check character MOLDs whose size is constant, but which aren't constant themselves. I added the extra argument to gfc_targ

Re: [build] Move unwinder to toplevel libgcc (v2)

2011-08-05 Thread Paolo Bonzini
On Fri, Aug 5, 2011 at 20:18, Mikael Morin wrote: > I suppose it is this patch that breaks bootstrap on 86_64-unknown-freebsd8.2: > /home/mik/gcc4x/src/gcc/crtstuff.c:64:28: fatal error: unwind-dw2-fde.h: No > such file or directory > > Fixed by the the following pat^Whack > Index: crtstuff.c > ==

PATCH to fix build failure on config/i386/i386.c

2011-08-05 Thread Jason Merrill
Kai's patch 2011-08-04 Kai Tietz * config/i386/i386.c (setup_incoming_varargs_ms_64): Set ix86_varargs_gpr_size and ix86_varargs_fpr_size to zero. broke build for me, as it put statements before the declarations at the beginning of the function. I'm checking this in to rest

C++ PATCH for c++/49812 (type of i++)

2011-08-05 Thread Jason Merrill
If i is a volatile int, i++ is an int rvalue. The compiler was treating it as a volatile int rvalue, of which there is no such thing. Tested x86_64-pc-linux-gnu, applying to trunk. commit f0049ff597cdeb2437cc9e39f633843bdb12bcba Author: Jason Merrill Date: Fri Aug 5 11:57:30 2011 -0400

C++ PATCH for c++/49983 (range-for/auto regression)

2011-08-05 Thread Jason Merrill
We can only do range for deduction if the range expression is non-dependent. Tested x86_64-pc-linux-gnu, applied to trunk. commit 2515fd89aeb268d395242d6ef3137da7119fdce8 Author: Jason Merrill Date: Fri Aug 5 10:16:58 2011 -0400 PR c++/49983 * parser.c (cp_parser_range_for): Only do

C++ PATCHes for c++/47453 (rejecting ({...}) for non-class types)

2011-08-05 Thread Jason Merrill
DR 1214 established that an initializer of the form ({something}) is only valid for an object of class type. This patch implements that, though I've only made it a pedwarn as there is some uncertainty about whether this is actually what we want. I've also split the patch into two to make it e

C++ PATCH to allow VLAs with C++0x auto

2011-08-05 Thread Jason Merrill
Paolo asked for GCC to allow deduction of auto from a variable-length array. Since auto doesn't have the issues involved with normal template deduction from VLAs (namely, the type not being link-time constant), this seems reasonable to me. Tested x86_64-pc-linux-gnu, applying to trunk. commit

[RFC PATCH, i386]: Allow zero_extended addresses (+ problems with reload and offsetable address, "o" constraint)

2011-08-05 Thread Uros Bizjak
Hello! Attached patch introduces generation of addr32 prefixed addresses, mainly intended to merge ZERO_EXTRACTed LEA calculations into address. After fixing various inconsistencies with "o" constraints, the patch works surprisingly well (in its current form fixes all reported problems in the PR

Re: [patch, ia64] Fix unaligned accesses on IA64 from dwarf2out.c

2011-08-05 Thread Richard Henderson
On 08/05/2011 10:54 AM, Steve Ellcey wrote: > - unsigned char checksum[16]; >struct md5_ctx ctx; > + unsigned char checksum[16]; How about struct md5_data { struct md5_ctx ctx; unsigned char checksum[16]; }; struct md5_data md5; with the structure definition somewhere inte

Re: [patch, ia64] Fix unaligned accesses on IA64 from dwarf2out.c

2011-08-05 Thread Andreas Schwab
Steve Ellcey writes: > Obviously this isn't a perfect fix, it is relying on how GCC is laying > out local variables which isn't gauranteed, but it fixes the problem and > I thought I would see if I could get approval for this simple fix or if > people think we need a more complete fix. Why not m

Re: [pph] Add initial support for including nested pph images (issue4847044)

2011-08-05 Thread Diego Novillo
On Fri, Aug 5, 2011 at 14:10, Gabriel Charette wrote: > On Fri, Aug 5, 2011 at 9:42 AM, Diego Novillo wrote: >> On Thu, Aug 4, 2011 at 17:47,   wrote: >>> So if I understand correctly, the reference system doesn't work yet, you >>> just put out the design in this patch and you'll fill up function

Re: Correct fix for scheduler bug PR11320

2011-08-05 Thread Richard Henderson
On 08/05/2011 10:41 AM, Bernd Schmidt wrote: > PR rtl-optimization/49900 > * sched-ebb.c (add_deps_for_risky_insns): Also add dependencies to > ensure basic blocks stay in the same order. Ok. r~

Re: [build] Move unwinder to toplevel libgcc (v2)

2011-08-05 Thread Mikael Morin
On Wednesday 03 August 2011 15:32:45 Rainer Orth wrote: > This is the revised/updated version of the patch originally posted at > > [build] Move unwinder to toplevel libgcc > http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01452.html > > and reposted as CFT at > > http://gcc.gnu

Re: Remove line 0 hack in cp/decl.c (issue4835047)

2011-08-05 Thread Gabriel Charette
On Fri, Aug 5, 2011 at 10:37 AM, Tom Tromey wrote: >> "Gabriel" == Gabriel Charette writes: > > Gabriel> This hack, has described in more details in the email labeled > Gabriel> "Line 0 Hack??", was now causing problem when serializing the > Gabriel> line_table in pph. > > I think you do have

[pph] small multi-pph tests (issue4810074)

2011-08-05 Thread Lawrence Crowl
This patch ads a bunch of small tests for multi-pph includes. Tested on x64. Index: gcc/testsuite/ChangeLog.pph 2011-08-04 Lawrence Crowl * g++.dg/pph/README: Add new file types. * g++.dg/pph/a0expinstinl.h: New. * g++.dg/pph/a0expinstnin.h: New. * g++.dg/pph

Re: [pph] Add initial support for including nested pph images (issue4847044)

2011-08-05 Thread Gabriel Charette
On Fri, Aug 5, 2011 at 9:42 AM, Diego Novillo wrote: > On Thu, Aug 4, 2011 at 17:47,   wrote: >> So if I understand correctly, the reference system doesn't work yet, you >> just put out the design in this patch and you'll fill up functionality >> in an upcoming patch so that's it's clearer what yo

Re: [Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.

2011-08-05 Thread Mikael Morin
On Friday 05 August 2011 19:30:49 Janus Weil wrote: > Hi Mikael, > > >> The extra > >> argument controls whether we check variable symbols for equality or > >> just their names. For the overriding checks it is sufficient to check > >> for names, because the arguments of the overriding procedure ar

[patch, ia64] Fix unaligned accesses on IA64 from dwarf2out.c

2011-08-05 Thread Steve Ellcey
Some recent changes in dwarf2out.c have caused GCC to generate unaligned data traps on IA64 Linux. In looking a this I tracked it down to md5_read_ctx in libiberty, which is called by md5_finish_ctx, which in turn is called by various routines in dwarf2out.c. md5_read_ctx has a comment that the b

Re: [pph] Allocate string tables separately. (issue4843044)

2011-08-05 Thread Diego Novillo
On Fri, Aug 5, 2011 at 13:42, wrote: > Yep this fixes the problem I had with the strings being freed early. Great. > http://codereview.appspot.com/4843044/diff/1/gcc/cp/pph-streamer-in.c#newcode157 > gcc/cp/pph-streamer-in.c:157: memcpy (new_strtab, strtab, strtab_size); > I don't think we nee

Re: Correct fix for scheduler bug PR11320

2011-08-05 Thread Bernd Schmidt
On 07/22/11 19:23, Bernd Schmidt wrote: > On 07/22/11 19:17, Richard Henderson wrote: >> On 07/22/2011 10:00 AM, Eric Botcazou wrote: It's getting confused about loads/stores being control_flow_insns and getting scheduled past each other nonetheless. Mind testing the following? >>> >>> s/

Re: [pph] Allocate string tables separately. (issue4843044)

2011-08-05 Thread gchare
Yep this fixes the problem I had with the strings being freed early. See comments inline below. http://codereview.appspot.com/4843044/diff/1/gcc/cp/pph-streamer-in.c File gcc/cp/pph-streamer-in.c (right): http://codereview.appspot.com/4843044/diff/1/gcc/cp/pph-streamer-in.c#newcode157 gcc/cp/p

Re: [pph] Stream and merge line table. (issue4836050)

2011-08-05 Thread gchare
Fixed all, committing to pph. Regarding builtins, it looked like some builtins like "int type" were streamed out as part of streaming out a non-builtin decl, i.e. a non-builtins with builtins in it's transitive closure. http://codereview.appspot.com/4836050/diff/1/gcc/cp/pph-streamer-out.c File

Re: Remove line 0 hack in cp/decl.c (issue4835047)

2011-08-05 Thread Diego Novillo
On Fri, Aug 5, 2011 at 13:37, Tom Tromey wrote: >> "Gabriel" == Gabriel Charette writes: > > Gabriel> This hack, has described in more details in the email labeled > Gabriel> "Line 0 Hack??", was now causing problem when serializing the > Gabriel> line_table in pph. > > I think you do have to

Re: Remove line 0 hack in cp/decl.c (issue4835047)

2011-08-05 Thread Tom Tromey
> "Gabriel" == Gabriel Charette writes: Gabriel> This hack, has described in more details in the email labeled Gabriel> "Line 0 Hack??", was now causing problem when serializing the Gabriel> line_table in pph. I think you do have to handle location 0 somehow. This is UNKNOWN_LOCATION, referr

[trans-mem] Use per-transaction reader flags for the serial lock

2011-08-05 Thread Torvald Riegel
This is a two-piece patch set. patch8: The first patch merely keeps a list of all threads with transactions, registering and deregistering gtm_transaction objects during their construction and destruction. The aligment attribute for the start of the shared part of a gtm_transaction object relies

Re: [pph] Stream and merge line table. (issue4836050)

2011-08-05 Thread Dodji Seketeli
Hello Gabriel, gch...@google.com (Gabriel Charette) a écrit: [...] > Do we want to apply the changes to libcpp to trunk now or wait?? [...] > 2011-08-04 Gabriel Charette [...] > * include/line-map.h (LC_REASON_BIT): Define as CHAR_BIT. > (COLUMN_BITS_BIT): Define as 8. >

Re: [Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.

2011-08-05 Thread Janus Weil
Hi Mikael, >> The extra >> argument controls whether we check variable symbols for equality or >> just their names. For the overriding checks it is sufficient to check >> for names, because the arguments of the overriding procedure are >> required to have the same names as in the base procedure. >

Re: [pph] Stream and merge line table. (issue4836050)

2011-08-05 Thread Gabriel Charette
[+ccoutant] >> Added lto streamer hooks to do this, but Cary (ccoutant) was saying he'd >> want it directly in lto. >> >> Do we want to apply the changes to libcpp to trunk now or wait?? > > How urgent is the merge?  It wouldn't hurt to run a few more test > cases.  I have some hidden in my client

Re: [PATCH 1/7] Linemap infrastructure for virtual locations

2011-08-05 Thread Jason Merrill
On 08/05/2011 01:04 PM, Dodji Seketeli wrote: Jason Merrill writes: Why not 0x? I'm not sure what the rationale for using that value here: /* If the column number is ridiculous or we've allocated a huge number of source_locations, give up on column numbers.

Re: [C++0x] contiguous bitfields race implementation

2011-08-05 Thread Aldy Hernandez
Alright, I'm back and bearing patches. Firmly ready for the crucifixion you will likely submit me to. :) I've pretty much rewritten everything, taking into account all your suggestions, and adding a handful of tests for corner cases we will now handle correctly. It seems the minimum needed

Re: [Patch, Fortran, OOP] PR 49112: [4.6/4.7 Regression] Missing type-bound procedure, "duplicate save" warnings and internal compiler error

2011-08-05 Thread Janus Weil
2011/7/31 Janus Weil : >>> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk and 4.6? >>> >> OK, Thanks. > > Thanks, Mikael. Committed to trunk as r176971. Will apply to 4.6 soon. Committed to 4.6 as r177468. Cheers, Janus

Re: [Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.

2011-08-05 Thread Mikael Morin
On Thursday 04 August 2011 23:42:11 Janus Weil wrote: > Hi all, > > attached is a draft patch fixing the PR in the subject line and > extending the checks for overriding type-bound functions. It regtests > cleanly on x86_64-unknown-linux-gnu already, but I would like to have > some feedback. Some

Re: [pph] Add initial support for including nested pph images (issue4847044)

2011-08-05 Thread Diego Novillo
On Thu, Aug 4, 2011 at 17:47, wrote: > So if I understand correctly, the reference system doesn't work yet, you > just put out the design in this patch and you'll fill up functionality > in an upcoming patch so that's it's clearer what you're adding? Right, the 'if (0)' in pph_in_includes() disa

Re: [s390] [committed]: fix call to store_bit_field()

2011-08-05 Thread Andreas Krebbel
On Fri, Aug 05, 2011 at 08:32:39AM -0500, Aldy Hernandez wrote: > Target could not build due to missing new arguments. > > Tested by building cc1. > > Committed as obvious. > * config/s390/s390.c (s390_expand_cs_hqi): Add new arguments to > store_bit_field. > (s390_expand_atomi

Re: [PATCH, i386]: various address related fixes/cleanups

2011-08-05 Thread Uros Bizjak
On Fri, Aug 5, 2011 at 5:26 PM, Uros Bizjak wrote: > These problems were found by testing ZERO_EXTENDed addresses with x32 > target. The problems were in handling of SUBREGs of parts.base and > parts.index and in usage of "offsetable operand", 'o' operand > constraint. Whops, forgot to commit th

Re: [pph] Stream and merge line table. (issue4836050)

2011-08-05 Thread dnovillo
OK with these changes. As far as the trunk changes go. Just commit your changes to the branch. I will get the trunk changes whenever they get approved in some future merge. Diego. http://codereview.appspot.com/4836050/diff/1/gcc/cp/pph-streamer-in.c File gcc/cp/pph-streamer-in.c (right): h

[Ada] Correct unique name of entities for formal verification

2011-08-05 Thread Arnaud Charlet
As some entities end up with an unqualified name, for example for the declaration of a library-level subprogram, the name given by Unique_Name should match the qualified name. Now corrected. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-05 Yannick Moy * sem_util.adb (Uniqu

[Ada] Implement Disable policy for Check/Debug_Policy

2011-08-05 Thread Arnaud Charlet
This patch adds a new policy DISABLE for Check_Policy, Debug_Policy and Assertion_Policy. Selecting DISABLE completely disables the corresponding pragma, including skipping semantic analysis of the arguments. This allows the use of a package of debug stuff that can be with'ed and referenced by debu

[PATCH, i386]: various address related fixes/cleanups

2011-08-05 Thread Uros Bizjak
Hello! These problems were found by testing ZERO_EXTENDed addresses with x32 target. The problems were in handling of SUBREGs of parts.base and parts.index and in usage of "offsetable operand", 'o' operand constraint. The patch does not generate zero extended addresses (yet), since there is a pro

[Ada] Implement -gnatyC for one space after -- in comments

2011-08-05 Thread Arnaud Charlet
For J505-006 This patch implements a new style switch option -gnatyC, which is just like -gnatyc but requiring one space after -- instead of two. Consider this test program: 1. package onespace is 2.-- don't flag this comment 3.-- don't flag this comment if -gnatyC 4

[Ada] Improve flag positioning for missing quote when comma present

2011-08-05 Thread Arnaud Charlet
This patch improves the positioning for the case of a missing string quote when a comma is the likely intended end of the string, as shown by this example: 1. procedure mquote is 2. begin 3.Error_Msg_NE ("this is a string with missing quote, N, E);

[PATCH, PR 49923] Check for misaligned accesses before doing SRA

2011-08-05 Thread Martin Jambor
Hi, the patch below fixes PR 49923 by checking for misaligned accesses before doing IPA-SRA (on strict alignment targets). I have checked it fixes the issue on compile farm sparc64 and I also included this in a bootstrap and testsuite run on an x86_64-linux just to double check. OK for trunk and

[Ada] Correct ALFA xrefs for separates and pre/post

2011-08-05 Thread Arnaud Charlet
The ALFA cross references generated for formal verification were missing for separates and incorrect inside pre/post. Now corrected. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-05 Yannick Moy * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation betwee

[Ada] Do not generate SCO for use clause or rep clause

2011-08-05 Thread Arnaud Charlet
This change removes SCO generation for USE clauses and representation clauses, which should not be subjected to coverage analysis. The following compilation must produce a single statement SCO corresponding to the declaration of type T: $ gcc -c -gnateS no_sco.ads $ grep "^CS" no_sco.ali CS t3:4-

Re: [PATCH, ARM] Support NEON's VABD with combine pass

2011-08-05 Thread Joseph S. Myers
On Fri, 5 Aug 2011, Ramana Radhakrishnan wrote: > I've had a couple of conversations about what the intrinsics > behaviour should in such cases with folks. Should we try to match vabs > (vsub) even for intrinsics and generate a vabd or desist from doing > this and generate only what was asked f

Re: [PATCH Atom][PR middle-end/44382] Tree reassociation improvement

2011-08-05 Thread Ilya Enkovich
Hello Richard, Thanks for reply! > > Well, it's enough to delay that to later passes that do this, so I'd prefer > to not change this in this patch. > OK, I'll fix it in next patch version. > I suppose yes.  Maybe the cases are also obsoleted by the improved > loop PHI handling. > I noticed that

Fix infinite recursion when recursively inlining function with alias

2011-08-05 Thread Jan Hubicka
Hi, this patch fixes the infinite recursion triggered when buildling MIPS libgcc. Bootstrapping/regtesting x86_64-linux and will commit it once it passes. Thanks to Richard for reducing the testcase. Honza PR middle-end/49735 * gcc.c-torture/compile/pr49735.c: New testcase

Re: [Patch, Fortran] (Coarray) Fix constraint checks for LOCK_TYPE

2011-08-05 Thread Mikael Morin
OK, I played a bit myself to see what the "right way" would look like, and I came up with the attached patch, which is complicated, and not even correct. And indeed, it plays with allocatable and pointer stuff. So your approach makes some sense now. I do here some propositions for comment and er

[Ada] Generalized indexing in Ada2012

2011-08-05 Thread Arnaud Charlet
Ada2012 introduces a general indexing mechanism, using implicit dereference and new aspects Constant_Indexing and Variable_Indexing. The following must compile and execute quietly in Ada_2012 mode: with Index1; use Index1; procedure Test_Index1 is Obj : Container (15) := (15, T => (others => -

[Ada] Equality testing against null in an instance

2011-08-05 Thread Arnaud Charlet
This patch fixes a view conflict in an instance, when an equality check against null involves an operand whose type is private and whose full view is a specific access type. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-05 Ed Schonberg * sem_type.adb (Specific_Type): in an

[Ada] SCO generation for pragma Debug

2011-08-05 Thread Arnaud Charlet
This change improves the SCO generation circuitry for pragma Debug. Specific support is added for dyadic pragma Debug (where the first argument is now treated as a P decision). SCO generation is suppressed altogether for any pragma Debug, or decision nested therein, if the pragma is not enabled. T

[Ada] Implementation of AI05-0212 : implicit dereference types

2011-08-05 Thread Arnaud Charlet
Ada2012 introduces the notion of a reference type, to generalize the use of cursors in containers. A reference type is a type with an access discriminant, with the semantics that a reference to an object of the type is in fact a reference to the object denoted by the access discriminant. The follow

Re: PR ada/49944, take 2 [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow)"

2011-08-05 Thread Arnaud Charlet
> >> --- This is the GNU/kFreeBSD (GNU/LinuxThreads) version of this > >> package > >> +-- This is the GNU/kFreeBSD PTHREADS version of this package > > > > Not sure why PTHREADS is upper cased here, any specific reason? > > Because that's how it was written in s-osint-freebsd.ads, that's all.

Re: PR ada/49944, take 2 [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow)"

2011-08-05 Thread Ludovic Brenta
Arnaud Charlet writes: >> --- This is the GNU/kFreeBSD (GNU/LinuxThreads) version of this package >> +-- This is the GNU/kFreeBSD PTHREADS version of this package > > Not sure why PTHREADS is upper cased here, any specific reason? Because that's how it was written in s-osint-freebsd.ads, that's

[Ada] Missing visibility check in formal packages

2011-08-05 Thread Arnaud Charlet
The compiler failed to reject a formal package whose name is the same as that of the generic unit, or its ultimate prefix. Compiling p-child2.ads must yield: p-child2.ads:7:43: "Tested" is hidden within declaration of formal package package P.Child2 is generic with package Tested is

[Ada] Visibility error in formal package with no associations

2011-08-05 Thread Arnaud Charlet
This patch fixes a visbility error involving the use the name of a generic package GP as a selector for a formal package that is an instantiation of GP. Compiling p-child.adb below must yield: p-child.ads:9:43: "P1" is not a visible entity of "Tested" package body P.Child is package body P

[Ada] Expansion of Ada2012 predicate checks for type conversions

2011-08-05 Thread Arnaud Charlet
This patch fixes an infinite recursion in the application of predicate checks to type conversions. The following must compile quietly: gcc -c -gnat12 ./why-conversions.ads --- with Why.Ids; use Why.Ids; package Why.Conversions is function "+" (Id : W_Unused_At_Start_OId) return

[Ada] Inherited subprograms may be both abstract and need overriding

2011-08-05 Thread Arnaud Charlet
AI05-0028 indicates that an inherited operation can be abstract, even if it is overridden in a currently non-visible private part, and also require overriding when the derived type is non-abstract. GNAT has always iplemented this properly. This patch improves on the error message when this error is

Re: [build] Move unwinder to toplevel libgcc (v2)

2011-08-05 Thread Paolo Bonzini
On 08/05/2011 01:46 PM, Rainer Orth wrote: >> How should we proceed with this patch, especially given the quite >> moderate comments from most affected target maintainers? > > ARM is the only target we should care a bit about. Any chance you can try > cross-compiling it (with a combined tre

[Ada] Set special options for ALFA mode (formal verification)

2011-08-05 Thread Arnaud Charlet
In ALFA mode, compiler is working in a special way in which it should believe it generates actual object code, while it is not; warnings should not be issued; checks should not be inserted in the code; various pragmas should be ignored. Changing the startup of frontend to do that. Tested on x86_64

[s390] [committed]: fix call to store_bit_field()

2011-08-05 Thread Aldy Hernandez
Target could not build due to missing new arguments. Tested by building cc1. Committed as obvious. * config/s390/s390.c (s390_expand_cs_hqi): Add new arguments to store_bit_field. (s390_expand_atomic): Same. Index: config/s390/s390.c =

[Ada] update gnatmake usage

2011-08-05 Thread Arnaud Charlet
Switches --create-map-file and --create-map-file- are added to the gnatmake usage. Lines for these switches should be in the output of gnatmake --help. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-05 Vincent Celier * makeusg.adb: Add lines for --create-map-file switches.

[Ada] Add support for file attributes on VxWorks 6

2011-08-05 Thread Arnaud Charlet
The routines to modify the file attributes (rwx) are now implemented on VxWorks 6 (kernel and RTP) using the underlying chmod VxWorks routine. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-05 Jose Ruiz * adaint.c (__gnat_set_writable, __gnat_set_readable, __gnat_se

[Ada] Do not generate wrong transient scopes for pragma check in ALFA mode

2011-08-05 Thread Arnaud Charlet
In formal verification mode, pragma check and enclosed expression are not expanded, so no transient scope should be introduced for a pragma check as a result of the introduction of temporary variables during expansion. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-05 Yannick Moy

[PATCH] Fix regression with unexistent symbol 'fullbinfile'

2011-08-05 Thread Alexandre Lissy
This symbol has been changed to binbase a couple of commits ago, yet some places remained untouched for the new name. --- gcc/melt-runtime.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/melt-runtime.c b/gcc/melt-runtime.c index 32a4288..ad49ccb 100644 ---

[MELT] Fix MELT breakage at build

2011-08-05 Thread Alexandre Lissy
Hello, Following is a trivial patch patch that fixes build of the current melt-branch, due to some previous commit changing identifier "fullbinfile" to "binbase" in function parameters but not in some usages at the end of the function.

[PATCH] Handle BIT_NOT_EXPR in VRP

2011-08-05 Thread Richard Guenther
This extends VRP to handle BIT_NOT_EXPR by composing ~X as -X - 1 (which should give us anti-range handling for free). It requires factoring a value-range taking worker from extract_range_from_unary_expr like I already did for extract_range_from_binary_expr, thus that is included in this patch.

[libgomp, testsuite] Fix libgomp.c++/task-8.C on Solaris 11 (PR libgomp/49965)

2011-08-05 Thread Rainer Orth
As described in the PR, libgomp.c++/task-8.C FAILs on Solaris 11 with Sun ld: FAIL: libgomp.c++/task-8.C -O0 (test for excess errors) Excess errors: ld: warning: symbol 'err' has differing types: (file /var/tmp//ccD0aiQD.o type=OBJT; file /lib/libc.so type=FUNC); /var/tmp//ccD0ai

Re: Fix Tru64 UNIX Ada bootstrap

2011-08-05 Thread Rainer Orth
Arnaud Charlet writes: >> unfortunately, it turned out that this fix only works when compiling >> ada/init.c inside gcc, not for gnatlib where CONST_CAST* isn't defined. >> I need the following patch instead, which is also simpler for using >> CONST_CAST, not CONST_CAST2, and provides a CONST_CAS

Re: RFC: Rewriting auto-inc-dec.c

2011-08-05 Thread Bernd Schmidt
On 07/21/11 17:42, Richard Sandiford wrote: > At the moment, auto-inc-dec.c only considers pairs of instructions, > so it can't optimise this kind of sequence. The attached patch is a > WIP (but almost complete) attempt to handle longer sequences too. So, I promised to look at it, I guess I bett

Re: [build] Move unwinder to toplevel libgcc (v2)

2011-08-05 Thread Rainer Orth
Paolo Bonzini writes: >> How should we proceed with this patch, especially given the quite >> moderate comments from most affected target maintainers? > > ARM is the only target we should care a bit about. Any chance you can try > cross-compiling it (with a combined tree it should not be hard)?

Re: [PATCH] Extend VRP BIT_IOR_EXPR to handle sign-bit

2011-08-05 Thread Paolo Bonzini
On 08/05/2011 01:04 PM, Richard Guenther wrote: (I believe that's the only bit we know sth about when both vr.min and vr.max are negative). Depends, if the value is between -2^16 and -1, we know something about all the bits to the left of bit 15. I think a better mask is: * MUST_BE_NONZERO

Re: [PATCH Atom][PR middle-end/44382] Tree reassociation improvement

2011-08-05 Thread Richard Guenther
On Tue, Jul 19, 2011 at 4:46 PM, Ilya Enkovich wrote: > Hello Richard, > > Thanks a lot for the review! > >> it's not easy to follow the flow of this function, esp. I wonder >> >> +      else >> +       { >> +         tree var = create_tmp_reg (TREE_TYPE (last_rhs1), "reassoc"); >> +         add_r

[patch, vectorizer] Fix a bug in creation of reduction epilogue

2011-08-05 Thread Ira Rosen
Hi, In case of multiple loop exit phis in vectorization of reduction we reduce them to one vector. The result of this reduction is later ignored in case we do the final value extraction with scalar code. This causes wrong code generation for gfortran.dg/forall_7.f90 with -O3 -funroll-loops on Cel

Re: PR ada/49944, take 2 [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow)"

2011-08-05 Thread Arnaud Charlet
> Here is my amended patch. I have fixed the stylistic issues in both > s-osinte-kfreebsd-gnu.ads and in the original place, > s-osinte-freebsd.ads. I hope the changelog entry is more correct, too. Better but not quite the standard style yet. I believe there's a doc in gnu.org explaining the pro

[PATCH] Extend VRP BIT_IOR_EXPR to handle sign-bit

2011-08-05 Thread Richard Guenther
This removes one weakness in BIT_IOR_EXPR handling which gives up even if we can compute a fully negative range. The following thus extends zero_nonzero_bits_from_vr to extract sign-bit information (I believe that's the only bit we know sth about when both vr.min and vr.max are negative). It als

Re: PR ada/49944, take 2 [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow)"

2011-08-05 Thread Ludovic Brenta
Arnaud Charlet writes: > The above ChangeLog isn't quite in the proper format. > Also see below for a few stylistic issues to fix. > > Once fixed, the patch is OK to commit, thanks. Here is my amended patch. I have fixed the stylistic issues in both s-osinte-kfreebsd-gnu.ads and in the original

Re: [PATCH, ARM] Generate conditional compares in Thumb2 state

2011-08-05 Thread Ramana Radhakrishnan
> Conversion from it/op/it/op to itt/op/op (and likewise for it/op/ie/op) > seems to be a good fit for a machine-dependent reorg pass. It does happen in cases where you have proper cond-exec patterns. It's final pre-scan that manages this though there is probably a win in doing this before constan

[PATCH] Add BIT_XOR_EXPR support to VRP

2011-08-05 Thread Richard Guenther
This adds BIT_XOR_EXPR support to propagation, similar to how we have BIT_IOR_EXPR and BIT_AND_EXPR support (but without the adjustment for constant vr0/1 min/max which I think we cannot do for XOR). Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2011-08-05 Richard Gue

  1   2   >