Re: GCC ICE bug with segfault...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2016.08.22 at 18:47 +1000, leon zadorin wrote:
> Hello,
> 
> I am not sure whether I can report a bug without an account in
> bugzilla (account creation temporarily disabled on that site)
> 
> ... so I am posting this here for the time being
> 
> GCC (trunk, rev 239646 -- but likely with earlier versions also, I
> haven't had the chance to test those yet) appears to ICE with
> segmentation fault given the following code (validity of which aside
> for the moment):
> 
> #include <stdlib.h>
> #include <string.h>
> 
> struct Blah {
>     char * a;
> };
> 
> template <typename T>
> void Test(T & Obj) {
>     auto && a(Obj.a);
>     a = (char*)::malloc(1024 * 1024);
>     ::memset(a + 28, 'X', 6);
> }
> 
> int main() {
>     Blah d;
>     Test(d);
>   return 0;
> }
> 
> When compiled as
> c++  -Wall main.c++
> 
> Causes GCC itself to crash hard:
> 
> main.c++: In function 'void Test(T&)':
> main.c++:12:25: internal compiler error: Segmentation fault
>   ::memset(a + 28, 'X', 6);

Thanks.
I've opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77321.

-- 
Markus



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux