https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #21 from Andrew Pinski ---
The trunk can detect this with the reduced testcase in comment #16 with
-fsanitize=address (it could not in GCC 12 though):
=
==1==ERROR: Addr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
Mark changed:
What|Removed |Added
CC||dev.kram5 at gmail dot com
--- Comment #20 from M
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #19 from Marc Glisse ---
(In reply to Manuel López-Ibáñez from comment #18)
> (In reply to Marc Glisse from comment #17)
> > And if func is inline,
> > it will require -fkeep-inline-functions.
>
> What is the difference between inlin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
Manuel López-Ibáñez changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Last reconfirmed|2014-0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #17 from Marc Glisse ---
(In reply to Jonathan Wakely from comment #16)
> Marc:
>
> struct Iter
> {
> Iter& operator+=(int) { return *this; }
>
> int operator*() { return i; }
>
> int i;
> };
>
> Iter& func(Iter iter, int n)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #16 from Jonathan Wakely ---
Marc:
struct Iter
{
Iter& operator+=(int) { return *this; }
int operator*() { return i; }
int i;
};
Iter& func(Iter iter, int n) {
return iter += n;
}
int main()
{
Iter iter = Iter();
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #15 from Marc Glisse ---
If you can reduce the testcase to a manageable size, I'll see why
https://gcc.gnu.org/ml/gcc-patches/2014-06/msg01692.html is not enough (it
should be, with -fkeep-inline-functions, but is apparently missing a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #14 from Jonathan Wakely ---
Yes, I can't convince gcc or clang to give a warning. Even address sanitizer
and undefined-behaviour sanitizer don't catch the problem.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #13 from Adrien Hamelin ---
I'm sorry that i made you lose your time :-(
I thought that kind of code would trigger a warning though.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #12 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #11)
> decltype(iter += i) is Iter& so you return a reference to a temporary which
> goes out of scope
Sorry, temporary is the wrong word - a reference to a local
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #10 from Jonathan Wakely ---
Thank you - that test case is much more useful
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
Adrien Hamelin changed:
What|Removed |Added
Attachment #33002|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
Adrien Hamelin changed:
What|Removed |Added
Attachment #33000|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #7 from Markus Trippelsdorf ---
Well, the default assumption, when someone posts a 77000 line preprocessed
program with strange runtime behavior, is that the program is buggy.
You have to convince us that the error is on the compiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #6 from Adrien Hamelin ---
I also wanted to say, my code may be not optimal or may be done in an easier
way or else (and if you have comments on it i'm ok with that), but what i think
what is the most important here is that it seems t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #5 from Adrien Hamelin ---
It's a type i created to be able to store data that does not fit in ram, with
some streaming with the hard drive.
But i removed most of it to simplify the problem search for you, even if i did
not think of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #4 from Markus Trippelsdorf ---
Also what is this Memory::Array thing? A std::array works as expected.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
Jonathan Wakely changed:
What|Removed |Added
Status|WAITING |UNCONFIRMED
Ever confirmed|1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
--- Comment #2 from Adrien Hamelin ---
Created attachment 33000
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33000&action=edit
Preprocessed file compressed in 7z
I compressed the file to match the 1000KB criteria, but this is the
preproc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61597
Markus Trippelsdorf changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Last reconfirmed|
21 matches
Mail list logo