title: sigemptyset() is overwriting next variable
body: <p>I have global variables</p>
  
  <pre><code>int a[10];
  struct sigaction act;
  int b[10];
  </code></pre>
  
  <p>Whenever I call</p>
  
  <pre><code>sigemptyset(&amp;act.sa_mask); 
  </code></pre>
  
  <p>array <code>a</code> is getting corrupted. I doubt if it is compiler issue. I am using CodeSourcery mips-linux-gnu-gcc version 4.5.2. I compile using</p>
  
  <pre><code>mips-linux-gnu-gcc -c -g -muclibc -pedantic -Wno-declaration-after-statement -std=gnu99 -G 0 -mips2 -msoft-float -mno-memcpy -fomit-frame-pointer -pipe -Wall -Wstrict-prototypes signal/signal.c
  
  mips-linux-gnu-gcc -G 0 -msoft-float -static -o signal  signal.o
  </code></pre>
  
  <p>My complete code follows:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;signal.h&gt;
  int a[10];
  struct sigaction act;
  int b[10];
  
  
  int main ();
  int main ()
  {
  int i;
  //initialize a and b
  for(i = 0 ; i &lt; 10;i++)
  {
      a[i]=1;b[i]=1;
  }
  
  sigemptyset(&amp;act.sa_mask);
  
  //print
  for(i = 0 ; i &lt; 10;i++)
  {
      printf("%d %d ",a[i],b[i]);
  }
  
  return 0;
  }
  </code></pre>
  
  <p><strong>I found that using the <code>-muclibc</code> option for compiling causes this issue.</strong></p>