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

Bug#379767: zhcon: cc1plus just sits there eating CPU and RAM for a simple program



Package: gcc-snapshot
Version: 20060714-1

When I compile the application "zhcon" with a recent version of gcc
4.2, cc1plus just sits there eating CPU and RAM but doesn't actually
seem to do anything.  gcc 4.1 or older versions of gcc 4.2 compile the
program in a few seconds.

20060626: works
20060714: fails
20060721: fails

I fowarded this as PR28479.


The log doesn't reall say anything but still...

> Automatic build of zhcon_1:0.2.6-1 on usurper by sbuild/amd64 0.46
...
> if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -DNDEBUG -Wall -MT fblinear16.o -MD -MP -MF ".deps/fblinear16.Tpo" -c -o fblinear16.o fblinear16.cpp; \
> 	then mv -f ".deps/fblinear16.Tpo" ".deps/fblinear16.Po"; else rm -f ".deps/fblinear16.Tpo"; exit 1; fi
> fblinear16.cpp: In member function 'virtual void FBLinear16::RevRect(int, int, int, int)':
> fblinear16.cpp:89: warning: operation on 'dest32' may be undefined
> g++: Internal error: Terminated (program cc1plus)
> Please submit a full bug report.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> For Debian GNU/Linux specific bug reporting instructions, see
> <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
> 
> make[4]: *** [fblinear16.o] Error 1

(That's after I killed cc1plus manually)


Test case (needs to be compiled with -O2):


#include <asm/types.h>

#define fb_readl(addr) (*(volatile __u32 *) (addr))
#define fb_writel(b,addr) (*(volatile __u32 *) (addr) = (b))

int main() {
    __u8* dest;
    __u32* dest32;
    dest32 = (__u32*)dest;
    for (int cnt = 10; cnt--;) {
        fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32++);
    }
}

-- 
Martin Michlmayr
http://www.cyrius.com/



Reply to: