https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
--- Comment #1 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #0)
> Since https://reviews.llvm.org/D99790 Clang optimizes it:
Oops, I meant to paste this, from clang 13.0.0 at -O1
f(int&): #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
--- Comment #2 from Jonathan Wakely ---
https://godbolt.org/z/8aMc14qfW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
Jakub Jelinek changed:
What|Removed |Added
CC||aldyh at gcc dot gnu.org,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
--- Comment #4 from Jonathan Wakely ---
Oops more slip-ups in the original submission ..
(In reply to Jonathan Wakely from comment #0)
> Although an int* might not actually point to a valid int, and so could be
> misaligned, and int& must be bo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
--- Comment #5 from Jonathan Wakely ---
(In reply to Jakub Jelinek from comment #3)
> I'm not sure if we can rely on this for non-C++ FEs though, so perhaps a
> langhook that we use during evrp on (D) SSA_NAME of PARM_DECLs and ask the
> FE whet
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
--- Comment #6 from Richard Biener ---
Is the case important enough to worry about? Actual accesses will be assumed
to be aligned according to the type.
But sure, we could in theory special-case REFERENCE_TYPE in CCP. Does any
other frontend
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
--- Comment #7 from Jonathan Wakely ---
(In reply to Richard Biener from comment #6)
> Is the case important enough to worry about?
I have no idea, I just noticed that clang is doing this and we aren't.
I doubt it's very important.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
--- Comment #8 from Jakub Jelinek ---
(In reply to Richard Biener from comment #6)
> Is the case important enough to worry about? Actual accesses will be
> assumed to be aligned according to the type.
>
> But sure, we could in theory special-c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
--- Comment #9 from rguenther at suse dot de ---
On Thu, 25 Nov 2021, jakub at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
>
> --- Comment #8 from Jakub Jelinek ---
> (In reply to Richard Biener from comment #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
--- Comment #10 from Jonathan Wakely ---
int*& is a reference to a pointer, and is perfectly valid.
You can't have a pointer to a reference (a reference isn't required to have any
storage, so taking the address of a reference doesn't make sense
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
Andrew Pinski changed:
What|Removed |Added
Last reconfirmed||2021-11-25
Ever confirmed|0
11 matches
Mail list logo