RE: upgrading gcc-4.4.0 to gcc-4.7.0:configure: error: cannot compute suffix of object files: cannot compile

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

 



After battling with this error for several hours, I was able to resolve this
error simply by putting my nop instruction pattern as the first pattern.
Initially, I had movqi as my first instruction pattern. Is this some
restriction or a bug in gcc?

While debugging the source I found that the assertion "gcc_assert
(cached_reg_save_code[reg][mode]);" gets failed in reg_save_code(), which
implies that value returned by "cached_reg_save_code[reg][mode]" has to be
non-zero. 

Now, in reg_save_code(), cached_reg_save_code[reg][mode] gets its value from
"recog_memoized (saveinsn)" as:

---snip---
  cached_reg_save_code[reg][mode] = recog_memoized (saveinsn);
---snip---

Now, in file insn-recog.c generated during the build, I see that movqi has
got a number 0 returned by recog function:

---snip---
L2: ATTRIBUTE_UNUSED_LABEL
  if (general_operand (x1, QImode))
    {
      operands[1] = x1;
      return 0;  /* movqi */
    }
  x1 = XEXP (x0, 0);
  goto L4;
---snip---

If I place any other pattern before movqi, so that movqi gets a non-zero
value, I do not get the internal compiler error.

Could you please elaborate on this behaviour? I could not find any such
restriction in the gcc documentation.


Thanks,
Deepti



> -----Original Message-----
> From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
> Behalf Of Ian Lance Taylor
> Sent: 13 June 2012 23:01
> To: damodar.sonone
> Cc: gcc-help@xxxxxxxxxxx
> Subject: Re: upgrading gcc-4.4.0 to gcc-4.7.0:configure: error: cannot
> compute suffix of object files: cannot compile
> 
> "damodar.sonone" <dsonone@xxxxxxxxx> writes:
> 
> > conftest.c: In function 'main':
> > conftest.c:16:1: internal compiler error: in reg_save_code, at
> > caller-save.c:158
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <http://gcc.gnu.org/bugs.html> for instructions.
> 
> This one is the problem.
> 
> It means that your newly built compiler has a bug--it gets an internal
> compiler error.  Unfortunately I don't have a simple solution here.  I
> don't know why such an error would occur for you, when it clearly
> doesn't happen for other people.
> 
> Ian



[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