[Bug c++/107360] ICE on sizeof(*f(x)) when f's (deduced) return type is a pointer to VLA

2023-01-29 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107360 --- Comment #5 from Martin Uecker --- Yes. After reconsidering this, this is not related to the other bugs mentioned above. I think your first example needs to be invalid, because the derived return type then depends on a variable inside the

[Bug c++/107360] ICE on sizeof(*f(x)) when f's (deduced) return type is a pointer to VLA

2023-01-29 Thread izbyshev at ispras dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107360 --- Comment #4 from Alexey Izbyshev --- (In reply to Martin Uecker from comment #3) > I think there there are cases were variably modified > return types are allowed in ISO C: > > void f(int n, double (*(bar(void)))[n]) > { > double

[Bug c++/107360] ICE on sizeof(*f(x)) when f's (deduced) return type is a pointer to VLA

2023-01-28 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107360 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #3

[Bug c++/107360] ICE on sizeof(*f(x)) when f's (deduced) return type is a pointer to VLA

2022-10-23 Thread izbyshev at ispras dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107360 --- Comment #2 from Alexey Izbyshev --- (In reply to Andrew Pinski from comment #1) > Maybe this should be invalid code ... Yes, I think it should be invalid. VLAs are not allowed in function return types in C. VLAs in C++ are a GCC extension,

[Bug c++/107360] ICE on sizeof(*f(x)) when f's (deduced) return type is a pointer to VLA

2022-10-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107360 Andrew Pinski changed: What|Removed |Added Keywords|ice-on-valid-code | --- Comment #1 from Andrew Pinski