>Submitter-Id: net >Originator: Friedemann Buergel >Organization: Weblaw AG, CH-3008 Bern, ++41-31-3805777, www.weblaw.ch >Confidential: no >Synopsis: Optimizer Bug in gcc 3.0, 3.3 and 3.4 >Severity: critical >Priority: medium >Category: c >Class: wrong-code >Release: 3.3.5 (Debian 1:3.3.5-13) (Debian stable) >Environment: System: Linux 2.4.18 #1 SMP Tue Jul 22 09:49:26 CEST 2003 i686 GNU/Linux Architecture: i686 host: i486-pc-linux-gnu build: i486-pc-linux-gnu target: i486-pc-linux-gnuconfigured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-includ$
>Description: gcc produces wrong code when optimizer (O1 O2 or O3) is used. The c-source showing the problem is generated by the flex lexical scanner.Applies to gcc versions 3.0.4, 3.3.5 and 3.4.4 (and maybe others not tested).
Tested on Debian/Intel platforms only. On gcc 2.95 and multiple former versions of gcc, the problem does not occur. >How-To-Repeat: Unpack the attached archive, cd showbug, make.It will first compile the program, then process and display some test data.
Prerequisites: You must have the flex lexical parser installed for this to work Expected behavior: Some HTML code shows up like <HTML lang="it"> <BODY> ... Actual behavior: The HTML is crippled so that the first character of many tags is missing, e.g. HTML ang="it"> BODY> ... >Fix: No fix is known to me, workaround is -O0 or using gcc 2.95