title: What is this GCC error on Linux, and how do I solve it? gcc: internal compiler error: Illegal instruction (program as)
body: <p>I type <code>gcc hello.c</code> and this appears:</p>
  <pre><code>gcc: internal compiler error: Illegal instruction (program as)
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See &lt;file:///usr/share/doc/gcc-4.6/README.Bugs&gt; for instructions.
  </code></pre>
  <p>hello.c is just:</p>
  <pre><code>int main()
  {
   return 0;
  }
  </code></pre>
  <p>I can't think of any way to make it simpler! (The same happened with <code>printf</code> in there.)</p>
  <p>So: how do you fix this? I'm on Raspian, on Raspberry Pi.</p>
  <h3>Edit</h3>
  <p>gcc -v gives</p>
  <pre><code>Using built-in specs.
  COLLECT_GCC=gcc
  COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
  Target: arm-linux-gnueabihf
  Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
  Thread model: posix
  gcc version 4.6.3 (Debian 4.6.3-14+rpi1) 
  </code></pre>
  <p>No I didn't install it.</p>
  <p>As for updates, <code>sudo apt-get install gcc</code> gives</p>
  <pre><code>Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  gcc is already the newest version.
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  </code></pre>
  <p>Yes, you can run <code>as</code>, it says <code>Illegal instruction</code> with no arguments.</p>
  <p>I have no idea what swap space is.</p>
  <p><code>gcc -O0 -g hello.c</code> gives the same error.</p>
  <p>gcc does not recognise <code>--enable-debug</code>.</p>