Re: gccadmin hooks: make it a public git repo

2021-12-14 Thread Martin Liška

On 12/13/21 21:58, Joseph Myers wrote:

There is a repository (/home/gccadmin/hooks-bin/.git), it's just not a
bare one (so not suitable for pushing to) and not public (but anyone in
the gcc group should be able to clone it, read-only, over ssh).


All right, I would be happy at least with that. So I tried:

$ scp -r mar...@gcc.gnu.org:/home/gccadmin/hooks-bin.git .

But it didn't copy any files (no output).

Can please anybody add me to gcc group?

Thanks,
Martin


Re: gccadmin hooks: make it a public git repo

2021-12-14 Thread Jonathan Wakely via Gcc
On Tue, 14 Dec 2021 at 15:40, Martin Liška  wrote:
>
> On 12/13/21 21:58, Joseph Myers wrote:
> > There is a repository (/home/gccadmin/hooks-bin/.git), it's just not a
> > bare one (so not suitable for pushing to) and not public (but anyone in
> > the gcc group should be able to clone it, read-only, over ssh).
>
> All right, I would be happy at least with that. So I tried:
>
> $ scp -r mar...@gcc.gnu.org:/home/gccadmin/hooks-bin.git .

That should be hooks-bin/.git not hooks-bin.git

And you probably want to copy the hooks-bin directory, not just its
.git, don't you?

This works for me:

git clone gcc.gnu.org:/home/gccadmin/hooks-bin

(I don't need to specify my user name because it's in my .ssh/config,
but use mar...@gcc.gnu.org if needed)


>
> But it didn't copy any files (no output).
>
> Can please anybody add me to gcc group?

You're already in that group.


getting branch conditions using ranger

2021-12-14 Thread Martin Sebor via Gcc

Andrew, to improve the context of the late warnings I'm trying
to see how to get the execution path(s) leading from function
entry up to a statement.  For example, for the code below I'd
like to "collect" and show the three conditionals in the context
of the warning:

extern char a[9];

void f (int m, int n, void *s)
{
  if (m < 3) m = 3;
  if (n < 4) n = 4;
  if (s != 0)
{
  char *d = a + 3;
  __builtin_memcpy (d, s, m + n);
}
}

At a minimum, I'd like to print a note after the warning:

  warning: ‘__builtin_memcpy’ writing between 7 and 2147483647 bytes 
into a region of size 6 overflows the destination [-Wstringop-overflow=]


  note: when 'm >= 3 && n >= 4 && s != 0'

(The final version would point to each conditional in the source
like the static analyzer does.)

For conditions that involve ranges used in the statements (i.e.,
the first two conditions in the source above), I wonder if rather
than traversing the CFG in a separate step, I might be able to
use Ranger to collect the conditions at the time it populates its
cache (i.e., when I call it to get range info for each statement).
I imagine I would need to derive a new class from gimple_ranger
and override some virtual member functions.  (And maybe also do
the same for ranger_cache?)

Does this sound like something I should be able to do within
the framework?  If yes, do you have any tips or suggestions for
where/how to start?

Thanks
Martin

PS I'm assuming -O0 for the above test case where the m + n
expression is a sum of two PHIs.  With -O1 and higher some of
the integer conditionals end up transformed into MAX_EXPRs so
it will likely need to be handled differently or I may not be
able to capture all the conditions reliably.  I don't know how
much that might compromise the result.


Why do these two trees print differently

2021-12-14 Thread Gary Oblock via Gcc
This is one of those things that has always puzzled
me so I thought I break down and finally ask.

There are two ways a memory reference (tree) prints:

MEM[(struct arc_t *)_684].flow

and

_684->flow

Poking under the hood of them, the tree codes and
operands are identical so what am I missing?

Thanks,

Gary


CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and contains information that is 
confidential and proprietary to Ampere Computing or its subsidiaries. It is to 
be used solely for the purpose of furthering the parties' business 
relationship. Any unauthorized review, copying, or distribution of this email 
(or any attachments thereto) is strictly prohibited. If you are not the 
intended recipient, please contact the sender immediately and permanently 
delete the original and any copies of this email and any attachments thereto.