From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27379 invoked by alias); 13 Nov 2001 09:26:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 27329 invoked by uid 71); 13 Nov 2001 09:26:01 -0000 Resent-Date: 13 Nov 2001 09:26:01 -0000 Resent-Message-ID: <20011113092601.27328.qmail@sourceware.cygnus.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, avbidder@acter.ch Received:(qmail 27279 invoked from network); 13 Nov 2001 09:25:48 -0000 Received: from unknown (HELO atlas.acter.ch) (212.126.160.108) by sourceware.cygnus.com with SMTP; 13 Nov 2001 09:25:48 -0000 Received: (from avbidder@localhost) by atlas.acter.ch (8.11.6/8.11.6/SuSE Linux 0.5) id fAD9PkS31753; Tue, 13 Nov 2001 10:25:46 +0100 Message-Id:<200111130925.fAD9PkS31753@atlas.acter.ch> Date: Thu, 01 Nov 2001 23:58:00 -0000 From: avbidder@acter.ch To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:3.113 Subject: target/4863: arm/thumb: code for switch statements: branch out of range X-SW-Source: 2001-11/txt/msg00036.txt.bz2 List-Id: >Number: 4863 >Category: target >Synopsis: arm/thumb: code for switch statements: branch out of range >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Tue Nov 13 01:26:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Adrian von Bidder >Release: 3.0.2 >Organization: Acter AG, Zürich, Switzerland >Environment: System: Linux atlas 2.4.14 #2 Wed Nov 7 14:03:16 CET 2001 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: arm-linux-elf configured with: ../gcc-3.0.2/configure --prefix=/home/avbidder/gcc-3 --target=arm-linux-elf --with-cpu=arm7tdmi --enable-checking --enable-languages=c,c++ >Description: For big functions, the code generated for switch statements contains branches that are longer than the allowed 2000+ bytes in the thumb instruction set of the arm. >How-To-Repeat: The enclosed function (sorry, it's quite huge) is iin regex.c in uclibc. Compiling with arm-linux-elf-gcc -fpic -mthumb shows the problem regardless of any other settings I trief. Compiling without -fpic or for the arm instruction set is no problem. Note: this is, as with my other bug, with the pure gcc-3.0.2 sources, without the patches I'm using/developping for the uclinux target. So I'm not the guilty here... Ok, here we go. It's 1000 lines C code. But I'd think if somebody sees where the problem lies there's no need to read it. Also, it's heavily cut down from the original function - everything before and after the switch statement was deleted. So even if it would compile, this code most probably does not work at all. begin 644 regex.c M='EP961E9B!I;G0@F5?=#L*7!E9&5F(&-H M87(@8F]O;&5A;CL*"G1Y<&5D968@96YU;0I["B`@;F]?;W`@/2`P+`H@('-U M8V-E960L"B`@97AA8W1N+`H@(&%N>6-H87(L"B`@8VAA7!E9&5F('5NPH@(&9A:6Q? MF4["B`@=6YS:6=N M960@879A:6P["GT*9F%I;%]S=&%C:U]T>7!E.PH*='EP961E9B!U;FEO;@I[ M"B`@9F%I;%]S=&%C:U]E;'1?="!W;W)D.PH@('-T%]T.PH*%]T('-Y;G1A>#L*("!C:&%R("IF87-T;6%P.PH@(&-H87(@*G1R86YS M;&%T93L*("!S:7IE7W0@F4Q+"!S=')I;FF4R.PH@("`@(&EN="!P;W,[ M"B`@("`@PH*("!I;G0@;6-N=#L*("!U;G-I9VYE9"!C:&%R("IP,3L*("!C;VYS M="!C:&%R("IE;F0Q+"`J96YD,CL*("!C;VYS="!C:&%R("IE;F1?;6%T8VA? M,2P@*F5N9%]M871C:%\R.PH@(&-O;G-T(&-H87(@*F0L("ID96YD.PH@('5N M7!E("IR96=?:6YF;SL*("!U;G-I9VYE9"!B97-T M7W)E9W-?3L*("!R96=IPH)("`@("`@9&\*"0E["@D)("!W:&EL M92`H9"`]/2!D96YD*0H)"2`@("!["@D)("`@("`@:68@*&1E;F0@/3T@96YD M7VUA=&-H7S(I"@D)"6=O=&\@9F%I;#L*"0D@("`@("!D(#T@PH)"2`@("`@("@H"`F"@D)*"@H*"@H*"AU;G-I M9VYE9"!L;VYG(&EN="D@,2D@/#P@,2D@/#P@,2D@/#P@,2D@/#P@,2D@/#P@ M,2D@/#P*"0D@,2DI"@D@("`@("`@)B8@*'1R86YS;&%T92`_("AC:&%R*2!T MPH)("`@("`@:68@*"%S971?PH)"2`@86-T:79E7W)E9U]T('(["@D)("!S971?PH)("`@(')E9VES=&5R('5NPH)"6EF("@APH)"2`@("!A M8W1I=F5?PH)"0DH*')E9U]I;F9O M6W)=*2YB:71S+FUA=&-H961?PH)("`@("`@=6YS:6=N960@ M8VAAPH)"2`@;&]W97-T7V%C=&EV95]R96<@/2`H*#$@/#P@ M."D@*R`Q*3L*"0D@(&AI9VAEPH)("`@("`@8F]O;&5A;B!I M5]F86EL=7)E7VIU;7`Z"@D)("!D;PH) M"2`@("!["@D)("`@("`@9&\*"0D)>PH)"0D@("AM8VYT*2`]("HH<#$I("8@ M,#,W-SL*"0D)("`H;6-N="D@*ST@*"AS:6=N960@8VAAPH)"2`@("`@ M('5NPH)"2`@("`@(&-H87(@*F1E%]F86EL=7)EF4@ M/#P@,2D@*B!S:7IE;V8@*&9A:6Q?F5O9B`H9F%I;%]S=&%C:U]E;'1?="DI*2P@*&9A:6Q?F4@/#P](#$L(#$I*2DI"@D)"2`@("!R971UPH)"2`@("!I9B`H9&5N9#(@/3T@96YD M7VUA=&-H7S(I"@D)("`@("`@8G)E86L["@D)("`@(&EF("AD96YD,B`]/2!R M96=E;F1;PH) M"2`@("!I9B`H(7-E=%]R96=S7VUA=&-H961?9&]N92D*"0D@("`@("!["@D) M"6%C=&EV95]R96=?="!R.PH)"0ES971?PH)("`@("`@8G)E86L["@D@("`@?0H*"2`@9V]T M;R!F86EL.PH)8V%S92!E;F1L:6YE.@H)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I(#\@,"`Z("@H9F%I;%]S=&%C M:RDNF4@ M/#P@,2D@*B!S:7IE;V8@*&9A:6Q?F5O9B`H9F%I;%]S=&%C:U]E;'1?="DI*2P@*&9A:6Q?F4@/#P](#$L(#$I*2DI"@D)("`@(')E='5R;B`M,CL[.PH)"7T["@D@ M("`@("!I9B`H,2D*"0EF;W(@*'1H:7-?PH)("`@ M("`@;6-N="TM.PH)("`@("`@<"`K/2`R.PH)("`@("`@9&\*"0E["@D)("!D M;PH)"2`@("!["@D)("`@("`@*'`I6S!=(#T@*&UC;G0I("8@,#,W-SL*"0D@ M("`@("`H<"E;,5T@/2`H;6-N="D@/CX@.#L*"0D@("`@?0H)"2`@=VAI;&4@ M*#`I.PH)"2`@*'`I("L](#(["@D)?0H)("`@("`@=VAI;&4@*#`I.PH)("`@ M('T*"2`@96QS92!I9B`H;6-N="`]/2`P*0H)("`@('L*"2`@("`@('!;,ET@ M/2`H=6YS:6=N960@8VAAPH)("`@("`@;6-N M="TM.PH)("`@("`@9&\*"0E["@D)("`H<"`K(#(I6S!=(#T@*&UC;G0I("8@ M,#,W-SL*"0D@("AP("L@,BE;,5T@/2`H;6-N="D@/CX@.#L*"0E]"@D@("`@ M("!W:&EL92`H,"D["@D@("`@("!G;W1O('5N8V]N9&ET:6]N86Q?:G5M<#L* M"2`@("!]"@D@(&5LPH)"2`@("`H;6-N="D@/2`J*'`I("8@,#,W-SL*"0D@("`@*&UC;G0I("L] M("@HPH)"2`@("`H;6-N="D@/2`J*'`I("8@,#,W-SL*"0D@("`@*&UC;G0I M("L]("@HF4R M*0H)"7Q\("@H9"D@/3T@96YD,BDI"@D@("`@("!B6YT87A?=&%B;&4* M"2`@("`@("!;*"@H9"D@/3T@96YD,2`_("IS=')I;F6YT M87A?=&%B;&4*"2`@("`@("!;*"@H9"D@/3T@96YD,2`_("IS=')I;FF4R*0H)"2`@?'P*"0D@("$HF4R*0H)("`@("`@)B8*"2`@("`@("AR95]S M>6YT87A?=&%B;&4*"2`@("`@("!;*"@H9"`M(#$I(#T](&5N9#$@/R`J$9&*5T@/3T@,2D*"2`@("`@("8F"@D@("`@ M("`H(2AR95]S>6YT87A?=&%B;&4*"0D@6R@H*&0I(#T](&5N9#$@/R`JPH)"2`@("`@("@H%]T86)L90H)("`@("`@(%LH*"AD*2`]/2!E;F0Q(#\@*G-TPH)("`@("`@:68@*"%S971?PH) M"2`@86-T:79E7W)E9U]T('(["@D)("!S971?Fix: Split up the case statements. Probably it is possible to compile the one file in ARM and with -mcaller-super-interworking/-mcallee-super-interworking Both are just cludges and require a bit of Makefile hackery for every file affected. >Release-Note: >Audit-Trail: >Unformatted: