#163 Workaround gcc 4.6.0 bug with sdcc 3.0.0

closed-fixed
None
5
2011-08-28
2011-04-13
Roy Rankin
No

When compiling sdcc 3.0.0 with gcc 4.6.0, gcc goes into an infinite loop. This patch turns off gcc optimisation in the problematic function.

Discussion

  • Roy Rankin

    Roy Rankin - 2011-04-13

    Workaround gcc 4.6.0 infinite loop

     
  • Borut Ražem

    Borut Ražem - 2011-07-17
    • assigned_to: nobody --> borutr
     
  • Borut Ražem

    Borut Ražem - 2011-07-17

    Sdcc HEAD compiles without problems with gcc 4.6.0 and 4.6.1 mingw cross compiler and with gcc 4.6.0 on sparc and x86 Solaris. Can you please provide some more info on which platform you encountered the problem, how you compiled (or where did you get) the gcc compiler, which options you used to compile sdcc...

    Borut

     
  • Roy Rankin

    Roy Rankin - 2011-07-18

    Borut,
    The problem was encountered when building in Fedora 15 and Fedora 16 (rawhide) on x86_64. The gcc was the version current in these versions of Fedora on 22 Mar 2001. The problem involves optimization at -O2. The patch turns off gcc optimization for the offending function and then turns it back on after the function. The SDCC source used was sdcc-src-3.0.0.tar.bz2

    Roy

     
  • Borut Ražem

    Borut Ražem - 2011-08-28

    Fixed in svn revision #6769.

    This seems to be Linux native x86 specific gcc bug: even on Linux x86_64 it works.
    This bog should be reported to gcc bug tracker.

    Borut

     
  • Borut Ražem

    Borut Ražem - 2011-08-28
    • status: open --> closed-fixed
     
  • Maarten Brock

    Maarten Brock - 2011-12-29

    Has anyone reported this bug to the gcc developers?

     
  • Borut Ražem

    Borut Ražem - 2011-12-29

    I haven't. It needs some work to minimize the case...

    Borut

     
  • Borut Ražem

    Borut Ražem - 2012-03-21

    I minimased ths case and submitted the gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52653

    I'm not sure if this is the only problem, since the submitted bug hangs the gcc compiler regardless of the optimization level, whilst the sdcc compilation hangs only with optimization -O2.

    Borut

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks