Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Hideaki Fujitani
Thu, 24 Dec 1992 11:09
gcc-2.3.2 bug
Author: Hideaki Fujitani
Date: Thu, 24 Dec 1992 11:09
Date: Thu, 24 Dec 1992 11:09
28 lines
942 bytes
942 bytes
A Merry Christmas.
Following simple program shows Bus error at "a[0] = 5." only when
dim is a multiple of 101.
GCC: gcc-2.3.2, OS: SunOS4.1.1, Machine Sun Station 2;
#include <stdio.h>
#include <stdlib.h>
main()
{
void *memory;
int *iv, dim;
double *a;
dim = 101;
memory = malloc(10000);
iv = (int*)memory;
memory += sizeof(int) * dim;
a = (double*)memory;
iv[3] = 15;
a[0] = 5.;
return 0;
}
# GNU is great ! fjtani@flab.fujitsu.co.jp
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads