Re: Undefined behavior due to 6.5.16.1p3

2015-03-10 Thread Richard Biener
On Mon, Mar 9, 2015 at 8:26 PM, Robbert Krebbers wrote: > I was wondering whether GCC uses 6.5.16.1p3 of the C11 standard as a license > to perform certain optimizations. If so, could anyone provide me an example > program. > > In particular, I am interested about the "then the overlap shall be ex

Re: Undefined behavior due to 6.5.16.1p3

2015-03-10 Thread Robbert Krebbers
Dear Richard, On 03/10/2015 09:51 AM, Richard Biener wrote: struct X { int i; int j; }; int foo (struct X *p, struct X *q) { q->j = 1; p->i = 0; return q->j; } will optimize to return 1. If *p and *q were allowed to overlap (&p->i == &q->j) this would invoke undefined behavior. Than

Re: Proposal for adding splay_tree_find (to find elements without updating the nodes).

2015-03-10 Thread Richard Biener
On Mon, Mar 9, 2015 at 11:59 PM, Steven Bosscher wrote: > On Mon, Mar 9, 2015 at 7:59 PM, vax mzn wrote: >> w.r.t, https://gcc.gnu.org/wiki/Speedup_areas where we want to improve the >> performance of splay trees. >> >> The function `splay_tree_node splay_tree_lookup (splay_tree, >> splay_tree_k

Re: Undefined behavior due to 6.5.16.1p3

2015-03-10 Thread Richard Biener
On Tue, Mar 10, 2015 at 10:11 AM, Robbert Krebbers wrote: > Dear Richard, > > On 03/10/2015 09:51 AM, Richard Biener wrote: >> >> struct X { int i; int j; }; >> >> int foo (struct X *p, struct X *q) >> { >>q->j = 1; >>p->i = 0; >>return q->j; >> } >> >> will optimize to return 1. If *

try_merge_delay_insn with delay list > 1

2015-03-10 Thread BELBACHIR Selim
Hi, I'm still working on a private backend on gcc 4.9.2. My processor provides instructions with 2 delay slots. I'm well aware that this feature is very uncommon and not fully tested. Nevertheless I submit the problem and the solution I've found. The bug is located in the function try_merge_de

RE: try_merge_delay_insn with delay list > 1

2015-03-10 Thread BELBACHIR Selim
Me again :) I enhanced my patch because it was not generalized for instructions with N delay_slots. Selim try_merge_patch2 Description: try_merge_patch2

Newlib/Cygwin now under GIT

2015-03-10 Thread Corinna Vinschen
Hi fellow developers, I'm happy to inform you that the move of Newlib/Cygwin from the src CVS repository to the new, combined GIT repository is now final. Here's how to access the new GIT repository: Read-only: git clone git://sourceware.org/git/newlib-cygwin.git Read/Write: git clone

Re: Undefined behavior due to 6.5.16.1p3

2015-03-10 Thread Martin Sebor
On 03/09/2015 01:26 PM, Robbert Krebbers wrote: I was wondering whether GCC uses 6.5.16.1p3 of the C11 standard as a license to perform certain optimizations. If so, could anyone provide me an example program. In particular, I am interested about the "then the overlap shall be exact" part of 6.5

Re: Newlib/Cygwin now under GIT

2015-03-10 Thread Joel Sherrill
Thank you for doing this! It cloned for me on the first try. Any particular reason, the repo is called newlib-cygwin.git and not the more general newlib.git. Cygwin isn't the only user of newlib. --joel On 3/10/2015 10:38 AM, Corinna Vinschen wrote: > Hi fellow developers, > > > I'm happy to inf

Re: Undefined behavior due to 6.5.16.1p3

2015-03-10 Thread Robbert Krebbers
On 03/10/2015 05:18 PM, Martin Sebor wrote: I suspect every compiler relies on this requirement in certain cases otherwise copying would require making use of temporary storage. Here's an example: Thanks, this example is indeed not already undefined by effective types, nor 6.2.6.1p6. An entire

Re: Undefined behavior due to 6.5.16.1p3

2015-03-10 Thread Robbert Krebbers
On 03/10/2015 05:44 PM, Robbert Krebbers wrote: On 03/10/2015 05:18 PM, Martin Sebor wrote: I suspect every compiler relies on this requirement in certain cases otherwise copying would require making use of temporary storage. Here's an example: Thanks, this example is indeed not already undefin

Re: [gomp4] Questions about "declare target" and "target update" pragmas

2015-03-10 Thread Ilya Verbin
Hi Jakub, I have one more question :) This testcase seems to be correct... or not? #pragma omp declare target extern int G; #pragma omp end declare target int G; int main () { #pragma omp target update to(G) return 0; } If yes, then we have a problem that the decl of G in varpool_node::ge

Re: Newlib/Cygwin now under GIT

2015-03-10 Thread Joseph Myers
On Tue, 10 Mar 2015, Corinna Vinschen wrote: > Hi fellow developers, > > > I'm happy to inform you that the move of Newlib/Cygwin from the src CVS > repository to the new, combined GIT repository is now final. I note that this repository includes the include/ directory, in its larger binutils-

Re: Newlib/Cygwin now under GIT

2015-03-10 Thread Corinna Vinschen
On Mar 10 11:20, Joel Sherrill wrote: > Thank you for doing this! It cloned for me on the first try. > > Any particular reason, the repo is called newlib-cygwin.git > and not the more general newlib.git. Cygwin isn't the > only user of newlib. No, but Cygwin is part of the repo. It's a *combined

Re: Newlib/Cygwin now under GIT

2015-03-10 Thread DJ Delorie
> This is a common problem. I guess newlib/cygwin got the oldest set > and, afaik, the GCC toplevel stuff is kind of the master. It would > be nice if we had some automatism in place to keep all former src > repos in sync. There was never any agreement on who the "master" was for toplevel sourc

Potential builtin memcpy bug in 4.9

2015-03-10 Thread Zan Lynx
I am trying to track down a bug that I only see on Fedora 21 with the GCC 4.9.2 compiler building x86_64 code. It might have started happening earlier. GCC 4.8 built without this problem. I am building the c-ares library as part of a larger project and getting malloc failures. Valgrind claims tha

Re: Undefined behavior due to 6.5.16.1p3

2015-03-10 Thread Joseph Myers
On Tue, 10 Mar 2015, Robbert Krebbers wrote: > On 03/10/2015 05:44 PM, Robbert Krebbers wrote: > > On 03/10/2015 05:18 PM, Martin Sebor wrote: > > > I suspect every compiler relies on this requirement in certain > > > cases otherwise copying would require making use of temporary > > > storage. Her

Questions about dynamic stack realignment

2015-03-10 Thread Steve Ellcey
This email is a follow-up to some earlier email I sent about alignment of spills and fills but did not get any replies to. https://gcc.gnu.org/ml/gcc/2015-03/msg00028.html After looking into that I have decided to look more into dynamically realigning the stack so that my spills and fills