Bug 65086 - ov511.c from kernel sources trips gcc
Summary: ov511.c from kernel sources trips gcc
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.3
Hardware: alpha
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-17 06:44 UTC by Michal Jaegermann
Modified: 2007-04-18 16:42 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-10-02 20:16:14 UTC
Embargoed:


Attachments (Terms of Use)
preprocessed file from Linux sources which bombs gcc on Alpha (81.05 KB, application/octet-stream)
2002-05-17 16:19 UTC, Michal Jaegermann
no flags Details

Description Michal Jaegermann 2002-05-17 06:44:50 UTC
Description of Problem:

The following command (script) on Alpha

:
TOPDIR=/home/src/work/linux-2.4.18-4
OPT=-O2

cc -D__KERNEL__ -I$TOPDIR/include -Wall -Wstrict-prototypes \
-Wno-trigraphs $OPT -fomit-frame-pointer -fno-strict-aliasing \
-fno-common -Wno-unused -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev6 \
-DMODULE -DMODVERSIONS -include $TOPDIR/include/linux/modversions.h \
-DKBUILD_BASENAME=ov511 -DEXPORT_SYMTAB -c ov511.c
exit

invariably ends up with

ov511.c: In function `ov51x_v4l1_open':
ov511.c:4697: Internal error: Segmentation fault.

Adjust TOPDIR, of course, and execute that from drivers/usb/ directory
after configuring sources.  This was from an attempt to recompile
patched sources for 2.4.18-4 on Alpha but "regular" 2.4.18 should do
as well.

After dropping OPT from '-O2' to '-O1' it is possible to recompile
ov511.c without troubles. None of remaining USB modules require such
manipulations to compile.

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

How Reproducible:
Bombs every time.

Comment 1 Jakub Jelinek 2002-05-17 09:28:05 UTC
Please provide preprocessed testcase.

Comment 2 Michal Jaegermann 2002-05-17 16:17:48 UTC
Attached.  With a preprocessed file the following script will cause exception,
or not, depending on OPT settings:

OPT=-O2

cc  -Wall -Wstrict-prototypes \
-Wno-trigraphs $OPT -fomit-frame-pointer -fno-strict-aliasing \
-fno-common -Wno-unused -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev6 \
-c ov511.expanded.c


Comment 3 Michal Jaegermann 2002-05-17 16:19:12 UTC
Created attachment 57747 [details]
preprocessed file from Linux sources which bombs gcc on Alpha

Comment 4 Michal Jaegermann 2002-06-15 20:33:47 UTC
I am clearly not the first person bitten by this bug.  See, for example,
kernel Makefiles in 7.2 distribution for Alpha where source rpm contains
patches to compile ov511.c with -O3 and where comments note that this particular
file will compile with any level of optimization but -O2 due to register
assignments problems (bryce should know more on the subject).

That comment is indeed correct for a case of a "generic" kernel.  If you will
try platform specific kernels where one may get '-mcpu=ev67' (example and you
will get that for "Nautilus") then this bug resurfaces with -O3 and higher.

Setting EXTRA_FLAGS to '-O3 -mcpu=ev4' looks to be "safe".


Comment 5 Richard Henderson 2004-10-02 20:16:14 UTC
Appears to work with gcc 3.3.4.


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