Bug 153268 - gcc hangs while compiling src/lat_ops.c from lmbench-3.0-a4
gcc hangs while compiling src/lat_ops.c from lmbench-3.0-a4
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2005-04-04 06:25 EDT by Arenas Belon, Carlo Marcelo
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.0.0-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-26 11:27:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 20742 None None None Never

  None (edit)
Description Arenas Belon, Carlo Marcelo 2005-04-04 06:25:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040808 Firefox/0.9.3

Description of problem:
while running :

gcc -O -DRUSAGE -DHAVE_uint=1 -DHAVE_int64_t=1 -DHAVE_DRAND48   -o ../bin/x86_64-linux-gnu/lat_ops lat_ops.c ../bin/x86_64-linux-gnu/lmbench.a -lm

the cc1 (/usr/libexec/gcc/x86_64-redhat-linux/4.0.0/cc1 -quiet -DRUSAGE -DHAVE_uint=1 -DHAVE_int64_t=1 -DHAVE_DRAND48 lat_ops.c -quiet -dumpbase lat_ops.c -mtune=k8 -auxbase lat_ops -O -o /tmp/ccblf70L.s) process eats 100% CPU but does nothing, leaving the generated assembler file incomplete as shown by the last 2 lines :

  xorl    %edx, %ecx
  orl     %ecx, %ed

while trying to force a core dump through a segfault the culprit seems to be :

lat_ops.c: In function 'do_integer_add':
lat_ops.c:97: internal compiler error: Segmentation fault

which corresponds to the following partially unrolled loop (including associated defines):

static volatile uint64  use_result_dummy;

use_int(int result) { use_result_dummy += result; }

struct _state {
        int     N;
        int     M;
        int     K;
        double* data;

#define TEN(a) a a a a a a a a a a
#define HUNDRED(a) TEN(TEN(a))

do_integer_add(iter_t iterations, void* cookie)
        struct _state *pState = (struct _state*)cookie;
        register int a = pState->N + 57;
        register int b = pState->N + 31;
        while (iterations-- > 0) {
                HUNDRED(a += b; b -= a;)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. wget http://cogent.dl.sourceforge.net/sourceforge/lmbench/lmbench-3.0-a4.tgz && tar -xvzf lmbench-3.0-a4.tgz
2. cd lmbench-3.0-a4 && make

Actual Results:  cc1 hang

Expected Results:  compile should have finished or at least shown an error saying why it couldn't

Additional info:
Comment 1 Jakub Jelinek 2005-04-26 11:27:09 EDT
Should be fixed in gcc-4.0.0-1.

Note You need to log in before you can comment on or make changes to this bug.