Converting function pointers to PC values in Python (was: [patch] Add libstdc++ type printers for class templates)

2014-08-04 Thread Samuel Bronson
Jonathan Wakely writes: > One part of the patch I wasn't sure about was this, where 'mgr' is a > function pointer: > > func = gdb.block_for_pc(int(mgr.cast(gdb.lookup_type('intptr_t' > > Is there a better way to get a pc from the function pointer? > I tried simply int(mgr) but it didn't work

Re: [GSoC] the separate option for all dimensions

2014-08-04 Thread Tobias Grosser
On 05/08/2014 06:02, Roman Gareev wrote: I've attached the patch, which sets the separate option for all dimensions. Is it fine for trunk? LGTM. Tobias

[GSoC] the separate option for all dimensions

2014-08-04 Thread Roman Gareev
I've attached the patch, which sets the separate option for all dimensions. Is it fine for trunk? -- Cheers, Roman Gareev. 2014-08-05 Roman Gareev [gcc/] * graphite-isl-ast-to-gimple.c: (set_options): New function. (scop_to_isl_ast

Go patch committed: Fix enclosing vars for func type in func lit

2014-08-04 Thread Ian Lance Taylor
This patch to the Go frontend fixes a dumb bug in which the enclosing vars were incorrectly cleared when a function literal contains a reference to a function type. The test for this has been committed to the master repository: http://codereview.appspot.com/121200043 . This fixes PR 61308. Boots

Go patch committed: Fix test of 64-bit index on 32-bit system

2014-08-04 Thread Ian Lance Taylor
This patch to the Go frontend changes it to not cast an index expression to int before checking whether the value is in bounds. This fixes PR 61866: on a 32-bit system, casting an int64 index to int drops the upper 32 bits of the value, and thus can cause an out-of-range index to appear to be in r

Re: [C++ Patch/RFC] PR 43906

2014-08-04 Thread Jason Merrill
On 08/04/2014 07:01 PM, Paolo Carlini wrote: In fact I wondered about that a few minutes after sending my message... And this is what I figured out: normally we have hard errors from composite_pointer_type (eg, try scalar types, class types), even for null values. The only exception I have been a

[PING][Patch]Fix ICE for gcc.dg/noncompile/920507-1.c

2014-08-04 Thread Tony Wang
Ping, any comment and suggestion on this bug fix? > -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Tony Wang > Sent: Tuesday, July 29, 2014 10:31 AM > To: gcc-patches@gcc.gnu.org; 'Richard Biener'; 'Jakub Jelinek' > Subject:

Re: [C++ Patch/RFC] PR 43906

2014-08-04 Thread Paolo Carlini
Hi, On 08/04/2014 10:45 PM, Jason Merrill wrote: On 08/04/2014 12:24 PM, Paolo Carlini wrote: + || (TYPE_PTR_P (type1) && VOID_TYPE_P (TREE_TYPE (type1)) Why check for VOID_TYPE_P? I'd think we would want to warn about comparing to other null pointer values as well. In fact I wond

Re: Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation

2014-08-04 Thread Bernd Schmidt
On 07/23/2014 04:37 PM, Ilya Verbin wrote: On 23 Jul 16:16, Bernd Schmidt wrote: Here's the latest version, which fixes some more issues and removes things that are now unnecessary. Configure scripts and toplevel autogenned stuff is left out and must be regenerated. Are you OK with me installin

Re: [PATCH] gcc/testsuite: Disable pr44194-1.c for BE Power64/Linux

2014-08-04 Thread Joseph S. Myers
On Mon, 4 Aug 2014, Maciej W. Rozycki wrote: > except from the newly-added 64-bit little-endian one (according to > LINUX64_DEFAULT_ABI_ELFv2 defined in rs6000/sysv4le.h and then > rs6000_return_in_memory) or where the `-mabi=elfv2' option has been used > (that, regrettably, looks undetectable

Re: Remove unnecessary and harmful fixincludes for Android

2014-08-04 Thread Andrew Pinski
On Mon, Aug 4, 2014 at 8:29 AM, Alexander Ivchenko wrote: > Hi, > > The following patch disables "stdio_va_list" fix: stdio.h is already > good in Android and, since ndk gcc is indented to be used with > different Android sysroots, it is actually harmful, because without > this fix only the versio

Re: Remove unnecessary and harmful fixincludes for Android

2014-08-04 Thread Joseph S. Myers
On Mon, 4 Aug 2014, Alexander Ivchenko wrote: > +2014-08-04 Alexander Ivchenko > + > + * inclhack.def (stdio_va_list): Disable fix for *android*. Testing for *android* is less than ideal, because of the possibility of configuring a *-linux* toolchain to have multilibs using various different

Re: [C++ Patch/RFC] PR 43906

2014-08-04 Thread Jason Merrill
On 08/04/2014 12:24 PM, Paolo Carlini wrote: + || (TYPE_PTR_P (type1) && VOID_TYPE_P (TREE_TYPE (type1)) Why check for VOID_TYPE_P? I'd think we would want to warn about comparing to other null pointer values as well. Jason

Invalid gimple for nested functions

2014-08-04 Thread Bernd Schmidt
Some code I added for the ptx backend triggered tree-checking failures for gimple created in tree-nested: we can end up taking the address of an SSA_NAME, which seems invalid. The problem is that code in tree-nested wants to change the rhs of an existing assignment, but just using gimple_assign

Re: {patch cp]: Disable hidden-inlines for pe-coff targets

2014-08-04 Thread Jason Merrill
On 08/04/2014 07:03 AM, Kai Tietz wrote: * decl2.c (determine_hidden_inline): Always fail for PE-COFF as there is no hidden visibility available. I'd think we should give a warning about -fvisibility-inlines-hidden on windows and turn off the flag rather than silently ignore it here.

Re: [patch cp]: Check for keep-inline-dllexport that we are operating on true inlines

2014-08-04 Thread Jason Merrill
OK. Jason

Re: [patch] Add const to constexpr member functions

2014-08-04 Thread Jonathan Wakely
On 15/04/14 19:29 +0100, Jonathan Wakely wrote: Add const to functions that would change meaning in C++14. Tested x86_64-linux, committed to trunk. Also committed to the 4.9 branch * include/bits/atomic_base.h (__atomic_base<_PTp*>::_M_type_size): Add const to constexpr membe

[PATCH] gcc/testsuite: Disable pr44194-1.c for BE Power64/Linux

2014-08-04 Thread Maciej W. Rozycki
Hi, The pr44194-1.c test case scores a failure invariably for big-endian Power64/Linux targets: PASS: gcc.dg/pr44194-1.c (test for excess errors) FAIL: gcc.dg/pr44194-1.c scan-rtl-dump dse1 "global deletions = (2|3)" PASS: gcc.dg/pr44194-1.c scan-rtl-dump-not final "insn[: ][^\n]*set \\(mem(?!

Re: [patch] libstdc++/61390 don't redeclare template-parameters

2014-08-04 Thread Jonathan Wakely
On 10/06/14 19:09 +0100, Jonathan Wakely wrote: Yo dawg, I heard you like templates, so I renamed the template-parameters of your template template-parameters so they are not the same as the template-parameters of your templates. G++ fails to diagnose this (PR17267) but Clang gives an error and

Re: [patch] Update catch(...) handlers to deal with __forced_unwind

2014-08-04 Thread Jonathan Wakely
On 04/08/14 19:59 +0200, Uros Bizjak wrote: On Mon, Aug 4, 2014 at 7:29 PM, Jonathan Wakely wrote: Uros, would backporting this to the 4.9 branch cause problems for alpha? No, I don't think so. The problem was identified as glibc bug that was fixed almost a year ago for 2.18. I assume since

Re: [patch] libstdc++/61374 fix string_view conversion and update to latest draft

2014-08-04 Thread Jonathan Wakely
On 01/06/14 18:24 +0100, Jonathan Wakely wrote: Tested x86_64-linux, committed to trunk. This should probably go on the 4.9 branch too, although we could leave the old default cosntructor semantics and just fix the conversion operator. Now committed to the 4.9 branch too. PR libstdc+

Re: [PATCH] add hash_set

2014-08-04 Thread Mike Stump
On Aug 4, 2014, at 10:46 AM, Trevor Saunders wrote: > >> I had a conflict which is why I noticed this issue in the first place. And I >> was using git merge :). > > I bet git log or blaim would get you better data faster. So, git merging I would recommend: [merge] conflictstyle = dif

Re: [patch] Update catch(...) handlers to deal with __forced_unwind

2014-08-04 Thread Uros Bizjak
On Mon, Aug 4, 2014 at 7:29 PM, Jonathan Wakely wrote: >> These two tests timeout on alpha-linux-gnu: >> >> FAIL: 30_threads/async/forced_unwind.cc execution test >> WARNING: program timed out. >> FAIL: 30_threads/packaged_task/forced_unwind.cc execution test >> WARNING: p

Re: Go 1.3 update broke Solaris bootstrap

2014-08-04 Thread Ian Lance Taylor
On Tue, Jul 22, 2014 at 1:14 AM, Rainer Orth wrote: > The recent Go 1.3 update (which I couldn't find posted to gcc-patches) > broke Solaris bootstrap: > > /vol/gcc/src/hg/trunk/local/libgo/runtime/mem.c:50:20: error: pointer targets > in passing argument 1 of 'mincore' differ in signedness [-Wer

Re: [PATCH] add hash_set

2014-08-04 Thread Jeff Law
On 08/04/14 11:15, Trevor Saunders wrote: On Sat, Aug 02, 2014 at 03:44:17PM -0700, Andrew Pinski wrote: On Tue, Jul 29, 2014 at 5:50 AM, wrote: From: Trevor Saunders Hi, this adds a hash_set wrapper around hash_table, and then replaces usage of pointer_set with it. bootstrapped +regtest

Re: [PATCH][optabs.c] Fix PR 61713: ICE when expanding single-threaded version of atomic_test_and_set

2014-08-04 Thread Jeff Law
On 08/04/14 10:54, Kyrill Tkachov wrote: On 25/07/14 23:05, Jeff Law wrote: On 07/23/14 02:53, Kyrill Tkachov wrote: Darn, had forgotten to attach the patch... On 16/07/14 12:30, Kyrill Tkachov wrote: Hi all, This fixes the PR mentioned in the subject. When expanding atomic_test_and_set we

Re: [patch] Update catch(...) handlers to deal with __forced_unwind

2014-08-04 Thread Jonathan Wakely
On 16 July 2014 17:22, Uros Bizjak wrote: > On Fri, Jun 6, 2014 at 4:31 PM, Jonathan Wakely wrote: >> On 06/06/14 12:40 +0200, Uros Bizjak wrote: >>> >>> On Fri, Jun 6, 2014 at 11:19 AM, Jonathan Wakely >>> wrote: On 06/06/14 10:27 +0200, Uros Bizjak wrote: > > > These two

Re: [PATCH][Ping v5] Add patch for debugging compiler ICEs

2014-08-04 Thread Maxim Ostapenko
Thanks Jeff and Jakub, I've reposted ICE debugging patch into gcc-patches mailing list (https://gcc.gnu.org/ml/gcc-patches/2014-08/msg00285.html). -Maxim On 08/01/2014 11:29 PM, Jeff Law wrote: On 08/01/14 02:00, Jakub Jelinek wrote: On Thu, Jul 24, 2014 at 04:39:28PM +0400, Maxim Ostapenko w

[PATCH] Add patch for debugging compiler ICEs.

2014-08-04 Thread Maxim Ostapenko
Hi, A years ago there was a discussion (https://gcc.gnu.org/ml/gcc-patches/2004-01/msg02437.html) about debugging compiler ICEs that resulted in a patch from Jakub, which dumps useful information into temporary file, but for some reasons this patch wasn't applied to trunk. This is the resur

Re: [RFC: Patch, PR 60102] [4.9/4.10 Regression] powerpc fp-bit ices@dwf_regno

2014-08-04 Thread Edmar
Committed on trunk, revision 213596 Committed on 4.9 branch, revision 213597 I made an omission on the first commit. I did not add the test case and corresponding ChangeLog entry. Committed as obvious on trunk, revision 213598 Thanks Edmar On 08/04/2014 05:25 AM, Ulrich Weigand wrote: David E

Re: [PATCH][optabs.c] Fix PR 61713: ICE when expanding single-threaded version of atomic_test_and_set

2014-08-04 Thread Kyrill Tkachov
On 25/07/14 23:05, Jeff Law wrote: On 07/23/14 02:53, Kyrill Tkachov wrote: Darn, had forgotten to attach the patch... On 16/07/14 12:30, Kyrill Tkachov wrote: Hi all, This fixes the PR mentioned in the subject. When expanding atomic_test_and_set we try the corresponding sync optabs and if

[PATCH][AArch64] Fix types for vqdmlals_lane_s32 and vqdmlsls_lane_s32 intrinsics

2014-08-04 Thread Kyrill Tkachov
Hi all, Now that uint64x1_t and uint64_t are not interchangeable these intrinsics have an incorrect type. The reason is that these intrinsics should have had the scalar type for some of their arguments and results according to the NEON intrinsics spec. This patch fixes that and updates the r

[PATCH][AArch64] Implement some saturating math NEON intrinsics

2014-08-04 Thread Kyrill Tkachov
Hi all, This patch implements some saturating math *laneq_s* intrinsics. The implementation is fairly straightforward, just use more general mode iterators, add appropriate builtins etc. Some execution tests are added with some scan-assembly parts to make sure we generate the correct lane num

Re: [PATCH] Fix bootstrap failure because of -Wreturn-local-addr

2014-08-04 Thread Marc Glisse
On Mon, 4 Aug 2014, Jakub Jelinek wrote: I've tried to bootstrap with r213515 because later revisions broke because of the hash_map and Ada changes, but unfortunately even that revision failus to bootstrap, the new -Wreturn-local-addr warning rightfully warns about get_ivts_expr possibly returni

Re: [PATCH] Add D demangling support to libiberty

2014-08-04 Thread Iain Buclaw
On 4 August 2014 17:06, Tom Tromey wrote: >> "Iain" == Iain Buclaw writes: > > Iain> This adds a demangler for the D programming language to libiberty, > Iain> intended to be used in GDB and Binutils. GDB already has a trimmed > Iain> down implementation of this, but have been advised that h

Re: [PATCH] Add D demangling support to libiberty

2014-08-04 Thread Iain Buclaw
On 4 August 2014 16:52, Ian Lance Taylor wrote: > On Sun, Aug 3, 2014 at 11:12 AM, Iain Buclaw wrote: >> >> This adds a demangler for the D programming language to libiberty, >> intended to be used in GDB and Binutils. GDB already has a trimmed >> down implementation of this, but have been advis

[PATCH][AArch64] Implement some vmul*_lane*_f* intrinsics in arm_neon.h

2014-08-04 Thread Kyrill Tkachov
Hi all, As part of other intrinsics-related messing around due to the float64x1_t changes I noticed these can be (re)implemented relatively easily. Tested on aarch64-none-elf and aarch64_be-none-elf to make sure the lane-wise intrinsics do the right thing. Ok for trunk? 2014-08-04 Kyrylo

[C++ Patch/RFC] PR 43906

2014-08-04 Thread Paolo Carlini
Hi, I suppose we can quickly resolve, one way or another, this rather old issue. Considering: extern void z(); void h() { if ( z != (void*)0 ); } we -Waddress warn in C and we don't in C++, due to the rather subtle differences between null_pointer_constant_p and null_ptr_cst_p. I believe we

Re: Prepare gcc for 64-bit obstacks

2014-08-04 Thread Tom Tromey
> "Alan" == Alan Modra writes: Alan> Bootstrapped and regression tested x86_64-linux and powerpc-linux, Alan> with both the new obstack.{h,c} and the old versions. OK to apply? Alan> gcc/java/ Alan> * mangle.c (finish_mangling): Cast result of obstack_base to (char *). Alan> * typeck.c

[committed] Fix GOMP_taskgroup_end

2014-08-04 Thread Jakub Jelinek
Hi! As can be seen on the depend-8.c testcase, only trying to schedule taskgroup->children in GOMP_taskgroup_end can lead to deadlock if depend clauses are involved - some task in the current taskgroup can depend on a task with the same parent, but from another taskgroup (one of the parent taskgro

Re: [PATCH] Add D demangling support to libiberty

2014-08-04 Thread Tom Tromey
> "Iain" == Iain Buclaw writes: Iain> This adds a demangler for the D programming language to libiberty, Iain> intended to be used in GDB and Binutils. GDB already has a trimmed Iain> down implementation of this, but have been advised that here would be Iain> a better location to house it.

Re: [PATCH] Add D demangling support to libiberty

2014-08-04 Thread Ian Lance Taylor
On Sun, Aug 3, 2014 at 11:12 AM, Iain Buclaw wrote: > > This adds a demangler for the D programming language to libiberty, > intended to be used in GDB and Binutils. GDB already has a trimmed > down implementation of this, but have been advised that here would be > a better location to house it.

[PATCH] Fix bootstrap failure because of -Wreturn-local-addr

2014-08-04 Thread Jakub Jelinek
Hi! I've tried to bootstrap with r213515 because later revisions broke because of the hash_map and Ada changes, but unfortunately even that revision failus to bootstrap, the new -Wreturn-local-addr warning rightfully warns about get_ivts_expr possibly returning address of a local variable. It see

Remove unnecessary and harmful fixincludes for Android

2014-08-04 Thread Alexander Ivchenko
Hi, The following patch disables "stdio_va_list" fix: stdio.h is already good in Android and, since ndk gcc is indented to be used with different Android sysroots, it is actually harmful, because without this fix only the version of stdio.h from the sysroot the compiler was built with will be used

[PATCH 1/2] Add -B support to gcc-ar/ranlib/nm

2014-08-04 Thread Andi Kleen
From: Andi Kleen To use gcc-{ar,ranlib} for boot strap we need to add a -B option to the tool. Since ar has weird and unusual argument conventions implement the code by hand instead of using any libraries. gcc/: 2014-08-04 Andi Kleen * gcc-ar.c (main): Support -B option. --- gcc/gc

Implement slim LTO bootstrap

2014-08-04 Thread Andi Kleen
This patchkit implements slim LTO bootstrap to speed up LTO bootstrap by ~18%. Passes LTO and normal bootstrap on x86_64-linux. Ok? -Andi

[PATCH 2/2] Support slim LTO bootstrap

2014-08-04 Thread Andi Kleen
From: Andi Kleen Add a new bootstrap-lto-slim config file that enables slim (non-fat) LTO bootstrap. This improves the performance of the LTO bootstrap. Speeds up the LTO bootstrap by ~18% on a 4 core system. This requires using gcc-ar/ranlib in post stage 1 builds, so these are passed to all s

Re: [GSoC] checking for the loop parallelism

2014-08-04 Thread Tobias Grosser
On 04/08/2014 16:23, Roman Gareev wrote: I would expect the to mark the i loop as non-parallel, but the j-loop as parallel. What is the partial schedule, the set of dependences and the dimension you check for both the i and the j loop? Yes, you are right. The i loop is non-parallel and j-loop i

Re: [GSoC] checking for the loop parallelism

2014-08-04 Thread Roman Gareev
Sorry for misprint. It passes all the tests from libgomp/testsuite/libgomp.graphite > The attached patch contains the improved version of checking for the > loop parallelism, which passes all the tests from > libgomp/testsuite/libgomp.graphite except > graphite-isl-ast-to-gimple.c. --

Re: [GSoC] checking for the loop parallelism

2014-08-04 Thread Roman Gareev
> I would expect the to mark the i loop as non-parallel, but the j-loop > as parallel. What is the partial schedule, the set of dependences and > the dimension you check for both the i and the j loop? Yes, you are right. The i loop is non-parallel and j-loop is parallel. I've found that this subst

Re: [PATCH 5/5] add libcc1

2014-08-04 Thread Tom Tromey
> "Mike" == Mike Stump writes: Mike> So the normal way to do this would be to make the plugin front-end Mike> non-default and then never gate any release decisions upon the state Mike> of the that front-end. Not sure if this is overly pedantic, but the plugin is just a library, not a front e

[GSoC][match-and-simplify] add pointerplus patterns

2014-08-04 Thread Prathamesh Kulkarni
Added patterns in associate_pointerplus and associate_pointerplus_diff. * genmatch.c (capture_max): Change value to 6. (match-plusminus.pd): Add new patterns. [gcc/testsuite/gcc.dg/tree-ssa] * match-plusminus.c (plusminus_9): New test-case. Thanks, Prathamesh Index: gcc/genmatch.c =

[PATCH][ARM/AArch64] Add CRC32 scheduling information to Cortex-A53 and Cortex-A57

2014-08-04 Thread Kyrill Tkachov
Hi all, Now that both backends have a way of generating CRC32 instructions this patch adds the crc type to the scheduling information for the Cortex-A53 and Cortex-A57 cores. For both Cortex-A53 and Cortex-A57 they behave similarly to shifted arithmetic instructions When scheduling for the C

WIP: Implement Filesystem TS

2014-08-04 Thread Jonathan Wakely
This is a 99% complete implementation of the Filesystem TS as defined by the N4099 draft, http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4099.html The .cc files use C++14 but the headers are C++11 so it can be used by more people. Rather than adding loads of new exports to libstdc++.so the

Re: [PATCH] Keep patch file permissions in mklog

2014-08-04 Thread Segher Boessenkool
> +if ($inline && $diff ne "-") { > + $tmp = `mktemp`; > + if ($? != 0) { > + die "Could not generate temp file"; > + } > > IMHO better use consistent style: system() or ticks with $?. Or let Perl itself create the temporary file: open(my $tmp_fh, "+>", undef) or

[PATCH AArch64] Prefer dup to zip for vec_perm_const; enable dup for bigendian; add testcase.

2014-08-04 Thread Alan Lawrence
At the moment, for two-element vectors, __builtin_shuffle (vector, (mask) {C, C}) for identical constants C outputs a zip (with both argument vectors the same) rather than a dup. Dup is more obvious and easier to read, so prefer it. For big-endian, aarch64_evpc_dup always aborts; however tests

Results for 4.10.0 20140802 (experimental) [trunk revision 213515] (GCC) testsuite on x86_64-apple-darwin13.3.0

2014-08-04 Thread Dominique Dhumieres
Wong list!-( Sorry, Dominique

Results for 4.10.0 20140802 (experimental) [trunk revision 213515] (GCC) testsuite on x86_64-apple-darwin13.3.0

2014-08-04 Thread Dominique Dhumieres
LAST_UPDATED: Updated Sat Aug 2 10:33:58 CEST 2014 to revision 213515. === acats tests === === acats Summary === # of expected passes2320 # of unexpected failures0 Native configuration is x86_64-apple-darwin13.3.0 === g++ tests

[Ada] Add internal abstraction for standard string test

2014-08-04 Thread Arnaud Charlet
This adds an internal abstraction for testing for standard string types. Internal front end cleanup, no function effect, no test required. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-08-04 Robert Dewar * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.

[PATCH] fix pr62009 use after free in redirect_edge_var_map_dup

2014-08-04 Thread tsaunders
From: Trevor Saunders Hi, It used to be that edge_var_maps held pointers to embedded vectors, but now it holds vectors. This means that now instead of copying the address of the embedded vector from the table we keep a pointer into the table. However that's incorrect because we may expand the

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Marek Polacek
On Mon, Aug 04, 2014 at 02:36:12PM +0200, Marc Glisse wrote: > On Mon, 4 Aug 2014, Marek Polacek wrote: > > >On Mon, Aug 04, 2014 at 12:51:06PM +0200, Richard Biener wrote: > >>On Mon, 4 Aug 2014, Marc Glisse wrote: > >> > >>>On Mon, 4 Aug 2014, Marek Polacek wrote: > >>> > +/* { dg-do compile

[Ada] Spurious elaboration warning on added postcondition call

2014-08-04 Thread Arnaud Charlet
This patch removes a spurious elaboration warning on some calls to postconditions. Such a call always appears within an enclosing body, and as such is not subject to an elaboration check, but the call that is inserted after the final (inserted) return statement in a procedure body is analyzed in th

[Ada] Support for hash based message authentication codes

2014-08-04 Thread Arnaud Charlet
This change introduces a new subprogram in the GNAT secure hash framework to allow computing HMACs based on the secure hash functions. This is achieved by initializing a context with a (non-empty) key. The following example shows how to compute the first HMAC-MD5 test from RFC2104: $ gnatmake -q

[Ada] Use of discriminants in derived types for SPARK 2014

2014-08-04 Thread Arnaud Charlet
This patch implements the following rules related to the discriminants of derived types: The type of a discriminant_specification shall be discrete. A discriminant_specification shall not occur as part of a derived type declaration whose parent type is discriminated. -- Sou

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Marc Glisse
On Mon, 4 Aug 2014, Marek Polacek wrote: On Mon, Aug 04, 2014 at 12:51:06PM +0200, Richard Biener wrote: On Mon, 4 Aug 2014, Marc Glisse wrote: On Mon, 4 Aug 2014, Marek Polacek wrote: +/* { dg-do compile } */ + +void +foo (void) +{ + volatile __PTRDIFF_TYPE__ t; + int i; + int *p = &i;

[PATCH] Make gimple_fold_builtin private

2014-08-04 Thread Richard Biener
The following patch removes the only user of gimple_fold_builtin, using the "proper" fold_stmt API. Boostrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2014-08-01 Richard Biener * gimple-fold.h (gimple_fold_builtin): Remove. * gimple-fold.c (gimple_fold_bu

[PATCH][convert.c] PR 61876: Guard transformation to lrint by -fno-math-errno

2014-08-04 Thread Kyrill Tkachov
Hi all, Following up on Josephs' comments on PR 61876 this patch guards the rint + cast -> lrint transformation on -fno-math-errno. Bootstrapped and tested on aarch64-linux and x86. Ok for trunk? Thanks, Kyrill 2014-08-04 Kyrylo Tkachov * convert.c (convert_to_integer): Guard transf

[PATCH][ARM] Adjust clz, rbit and rev patterns for -mrestrict-it

2014-08-04 Thread Kyrill Tkachov
Hi all, While working on another patch and looking at the rbit and clz patterns, I noticed that in aarch32 the relevant patterns are not adjusted for -mrestrict-it. A program like: int foo (int a, int b) { if (a + 5 == b) return __builtin_ctz (a); return 1; } compiled with -march=arm

[PATCH][match-and-simplify] Merge from trunk

2014-08-04 Thread Richard Biener
2014-08-04 Richard Biener Merge from trunk r211444 through r213455. * genmatch.c (operators): Adjust for hash_table interface change. * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Also fold non-call stmts inplace to avoid creating new SSA names.

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Richard Biener
On Mon, 4 Aug 2014, Marek Polacek wrote: > On Mon, Aug 04, 2014 at 12:26:01PM +0200, Richard Biener wrote: > > On Mon, 4 Aug 2014, Marek Polacek wrote: > > > > > This PR is about bogus overflow warning that we issue for e.g. > > > int *q = &i + 1; > > > q - (q - 1); > > > because pointer_diff

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Marek Polacek
On Mon, Aug 04, 2014 at 12:51:06PM +0200, Richard Biener wrote: > On Mon, 4 Aug 2014, Marc Glisse wrote: > > > On Mon, 4 Aug 2014, Marek Polacek wrote: > > > > > +/* { dg-do compile } */ > > > + > > > +void > > > +foo (void) > > > +{ > > > + volatile __PTRDIFF_TYPE__ t; > > > + int i; > > > +

Re: [patch] No allocation for empty unordered containers

2014-08-04 Thread Jonathan Wakely
On 04/08/14 12:49 +0100, Jonathan Wakely wrote: On 25/07/14 22:53 +0200, François Dumont wrote: Hi I think I never get feedback regarding this patch proposal. Note I've been trying to weigh up the pros and cons and am unsure what's best, but I think my preference is to have a noexcept defau

Re: [PATCH] Keep patch file permissions in mklog

2014-08-04 Thread Yury Gribov
> thanks for the review. Np, I'm personally happy to see that script is useful. > I've now interpreted it such that --inline prints to stdout what it > would print to the patch file otherwise, that is, both log and patch. > Printing just the log to stdout can be already be achieved by not using

Re: [patch] No allocation for empty unordered containers

2014-08-04 Thread Jonathan Wakely
On 25/07/14 22:53 +0200, François Dumont wrote: Hi I think I never get feedback regarding this patch proposal. Note I've been trying to weigh up the pros and cons and am unsure what's best, but I think my preference is to have a noexcept default constructor. Unless you hear any objections

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Marek Polacek
On Mon, Aug 04, 2014 at 12:26:01PM +0200, Richard Biener wrote: > On Mon, 4 Aug 2014, Marek Polacek wrote: > > > This PR is about bogus overflow warning that we issue for e.g. > > int *q = &i + 1; > > q - (q - 1); > > because pointer_diff receives p - (p + -1U) which gets simplified to > > 1U

Re: [PATCH, i386] Add RDRND and MOVBE for AMD bdver4

2014-08-04 Thread Rainer Orth
Uros Bizjak writes: > On Mon, Aug 4, 2014 at 12:58 PM, Gopalasubramanian, Ganesh > wrote: >> Below patch adds PTA_RDRND and PTA_MOVBE for bdver4. >> >> Bootstrap passes. >> >> Ok for upstream? > >> 2014-08-04 Ganesh Gopalasubramanian >> >> +* gcc/config/i386/i386.c (ix86_option_overrid

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Richard Biener
On Mon, 4 Aug 2014, Jakub Jelinek wrote: > On Mon, Aug 04, 2014 at 12:26:01PM +0200, Richard Biener wrote: > > I think that tree-ssa-forwprop.c already simplifies this in > > associate_plusminus with (T)(P + A) - (T)P -> (T)A. Well, > > maybe not - but then the code should be massages to handle i

Re: [PATCH, i386] Add RDRND and MOVBE for AMD bdver4

2014-08-04 Thread Uros Bizjak
On Mon, Aug 4, 2014 at 12:58 PM, Gopalasubramanian, Ganesh wrote: > Below patch adds PTA_RDRND and PTA_MOVBE for bdver4. > > Bootstrap passes. > > Ok for upstream? > 2014-08-04 Ganesh Gopalasubramanian > > +* gcc/config/i386/i386.c (ix86_option_override_internal): Add > + PTA_RDRN

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Jakub Jelinek
On Mon, Aug 04, 2014 at 12:26:01PM +0200, Richard Biener wrote: > I think that tree-ssa-forwprop.c already simplifies this in > associate_plusminus with (T)(P + A) - (T)P -> (T)A. Well, > maybe not - but then the code should be massages to handle it. > > Can you double-check and do that? > > Oth

[patch cp]: Check for keep-inline-dllexport that we are operating on true inlines

2014-08-04 Thread Kai Tietz
Hi, This patch makes sure that we check for flag keep-inline-dllexport that we operate on true inlines as we do it for keep-inline-functions. ChangeLog 2014-08-04 Kai Tietz * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport that we operate on a true inline. Tested

Prepare gcc for 64-bit obstacks

2014-08-04 Thread Alan Modra
Two small changes to gcc code to support newer obstacks: 1) gcc currently calls _obstack_begin, which requires some ugly casts on alloc and free functions, and the casts will change when/if 64-bit obstacks are available. It's cleaner to use the convenience functions provided in obstack.h. 2) Cur

{patch cp]: Disable hidden-inlines for pe-coff targets

2014-08-04 Thread Kai Tietz
Hi, This patch makes sure that visibility-option for hidden-inlines doesn't show any effect for pe-coff as for those targets no concept of hidden-visiblitly isn't present. ChangeLog 2014-08-04 Kai Tietz * decl2.c (determine_hidden_inline): Always fail for PE-COFF as there is no hidde

[PATCH, i386] Add RDRND and MOVBE for AMD bdver4

2014-08-04 Thread Gopalasubramanian, Ganesh
Below patch adds PTA_RDRND and PTA_MOVBE for bdver4. Bootstrap passes. Ok for upstream? Regards Ganesh Index: gcc/ChangeLog === --- gcc/ChangeLog (revision 213568) +++ gcc/ChangeLog (working copy) @@ -24,6 +24,11 @@ 20

[Ada] Aspect/pragma SPARK_Mode in generic

2014-08-04 Thread Arnaud Charlet
This patch allows the uses of aspect/pragma SPARK_Mode in generic units. It also implements the following rule concerning the interplay between instances and SPARK_Mode "off": However, if an instance of a generic unit is enclosed by code where SPARK_Mode is Off and if any SPARK_Mode specific

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Richard Biener
On Mon, 4 Aug 2014, Marc Glisse wrote: > On Mon, 4 Aug 2014, Marek Polacek wrote: > > > +/* { dg-do compile } */ > > + > > +void > > +foo (void) > > +{ > > + volatile __PTRDIFF_TYPE__ t; > > + int i; > > + int *p = &i; > > + int *q = &i + 1; > > + t = q - (q - 1); > > + t = (q - 1) - q; /*

[Ada] Crash on entry call with limited view of synchronized object

2014-08-04 Thread Arnaud Charlet
The prefix of an entry call may be a limited view, in which case the expansion of the call must use the non-limited view, which is available at the point of an entry call. The following must compile quietly: gcc -c railway-train.adb --- package Railway is end Railway; --- limited with Railway

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Marc Glisse
On Mon, 4 Aug 2014, Marek Polacek wrote: +/* { dg-do compile } */ + +void +foo (void) +{ + volatile __PTRDIFF_TYPE__ t; + int i; + int *p = &i; + int *q = &i + 1; + t = q - (q - 1); + t = (q - 1) - q; /* { dg-warning "integer overflow in expression" } */ + t = p - (p - 1); + t = (p - 1)

[Ada] Add documentation for aspect Invariant'Class

2014-08-04 Thread Arnaud Charlet
Documentation change only, no test required Tested on x86_64-pc-linux-gnu, committed on trunk 2014-08-04 Robert Dewar * gnat_rm.texi: Add section on aspect Invariant'Class. Index: gnat_rm.texi === --- gnat_rm.texi

[Ada] Aspect Import with a value of False

2014-08-04 Thread Arnaud Charlet
In Ada 2012, boolean aspects are True by default, but can specify explicitly a value of False. In the case of an Import aspect, this indicates that the corresponding entity must have a completion in Ada, and not in the language specified in a Convention aspect. Compiling main.adb must yield:

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Richard Biener
On Mon, 4 Aug 2014, Marek Polacek wrote: > This PR is about bogus overflow warning that we issue for e.g. > int *q = &i + 1; > q - (q - 1); > because pointer_diff receives p - (p + -1U) which gets simplified to > 1U - with overflow. We could drop the overflow flag to suppress the > warning, b

Re: [RFC: Patch, PR 60102] [4.9/4.10 Regression] powerpc fp-bit ices@dwf_regno

2014-08-04 Thread Ulrich Weigand
David Edelsohn wrote: > On Fri, Aug 1, 2014 at 2:03 PM, rohitarul...@freescale.com > wrote: > > [libgcc] > > 2014-07-31 Rohit > > * config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Update > > based on change in SPE high register numbers and 3 HTM registers. > > > > [gc

[C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-04 Thread Marek Polacek
This PR is about bogus overflow warning that we issue for e.g. int *q = &i + 1; q - (q - 1); because pointer_diff receives p - (p + -1U) which gets simplified to 1U - with overflow. We could drop the overflow flag to suppress the warning, but I think we should just remove the optimization alto

[AArch64] Some aarch64-builtins.c cleanup.

2014-08-04 Thread James Greenhalgh
This patch removes the aarch64_simd_builtin_type enum. This is only really used for indexing in to an array of strings and an array of machine_mode. We don't need that. Given all the macro pasting we presently do in this file, just add another. Then we can store a proper machine_mode for each bui

[Ada] Freezing subprogram that returns a limited view

2014-08-04 Thread Arnaud Charlet
This patch handles properly a function declared in package A that returns the limited view of a type declared in package B, when the function is called from a context that has with_clauses on A and B. Previous to this patch such a call would crash the compiler because of a misplaced freeze node. T

[Ada] Make sure Do_Range_Check flag is set when needed on OUT parameter

2014-08-04 Thread Arnaud Charlet
In -gnatc or GNATprove mode, there were cases in which the Do_Range_Check flag was not set on an OUT parameter, causing e.g. GNAT prove to miss the requirement for proving that an out parameter result was in range. This is now corrected, the following test, compiled in -gnatd.F (GNATprove mode) wi

[Ada] Aspect/pragma Default_Initial_Condition

2014-08-04 Thread Arnaud Charlet
This patch implements aspect/pragma Default_Initial_Condition. The construct has the following semantics and runtime behavior: The Default_Initial_Condition aspect is introduced by an aspect_specification where the aspect_mark is Default_Initial_Condition. The aspect may be specified only as part

[Ada] Type invariant procedure called on an uninitialized object

2014-08-04 Thread Arnaud Charlet
The compiler can generate a call to a type's invariant-checking procedure on an uninitialized object, such as a temporary object created for holding an aggregate. This is prevented by inhibiting the call when No_Initialization is set on the object. The following test must compile and execute quiet

[Ada] Apply special expansion in GNATprove mode also for pre-analysis

2014-08-04 Thread Arnaud Charlet
Some expression are only pre-analyzed in GNATprove mode, like default expressions and assertions. These also need to be light-expanded for formal verification. This is the second commit attempt, as the first one failed to build GNAT due to a bug. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] New defaults for some project attributes

2014-08-04 Thread Arnaud Charlet
Some of the project attributes have new defaults that are no longer the empty string of the empty string list. These defaults are used as values of attribute references when the attribute has not been declared. Object_Dir has as default ".". Exec_Dir has as default Object_Dir, as previously specifi

Re: [PATCH libstdc++ v3] - Add xmethods for std::vector and std::unique_ptr

2014-08-04 Thread Jonathan Wakely
On 25 July 2014 20:46, Siva Chandra wrote: > The attached patch is identical to v2 except that I rebased it over > the current head. > > To recollect, GDB now supports xmethods in its Python API: > https://sourceware.org/gdb/current/onlinedocs/gdb/Xmethods-In-Python.html > > This feature will be av

  1   2   >