🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1469

gcc-2.3.2 bug

#1469
From: Hideaki Fujitani
Date: Thu, 24 Dec 1992 11:09
28 lines
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
Technical Details
Message-ID: <9212241109.AA10647@hera.han.flab.fujitsu.co.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!han.flab.fujitsu.co.JP!fjtani

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!han.flab.fujitsu.co.JP!fjtani
From: fjtani@han.flab.fujitsu.co.JP (Hideaki Fujitani)
Subject: gcc-2.3.2 bug
Message-ID: <9212241109.AA10647@hera.han.flab.fujitsu.co.jp>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 24 Dec 1992 11:09:06 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 30