From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17357 invoked by alias); 27 Nov 2001 18:16:04 -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 17294 invoked by uid 71); 27 Nov 2001 18:16:02 -0000 Resent-Date: 27 Nov 2001 18:16:02 -0000 Resent-Message-ID: <20011127181602.17291.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, edward.connell@sas.com Received:(qmail 13524 invoked by uid 61); 27 Nov 2001 18:08:30 -0000 Message-Id:<20011127180830.13523.qmail@sourceware.cygnus.com> Date: Wed, 21 Nov 2001 08:36:00 -0000 From: edward.connell@sas.com Reply-To: edward.connell@sas.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.2 (1.1.1.1.2.21) Subject: target/4959: gcc/s390 fails with more than 1024 function pointers X-SW-Source: 2001-11/txt/msg00678.txt.bz2 List-Id: >Number: 4959 >Category: target >Synopsis: gcc/s390 fails with more than 1024 function pointers >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Nov 27 10:16:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: edward.connell@sas.com >Release: gcc version 2.95.3 20010315 (release) >Organization: >Environment: Linux/s390 native and cross-build >Description: gcc fails to compile a file with more than 1024 function pointers with "/var/tmp/cc6ojHFY.s:2073: Error: operand out of range (4096 not between 0 and 4095)". Gcc is trying to use a relative offset but the distance gets too large. Imagine the following with N=1025. **************** int i0(); int i1(); int i2(); int main() { int (*funcs[3])(); funcs[0]=i0; funcs[1]=i1; funcs[2]=i2; return 0; } ************** This program will generate a .c file which fails to compile on s390. ************** #define NUM 1025 int main() { int i; for (i=0; iHow-To-Repeat: #define NUM 1025 int main() { int i; for (i=0; iFix: >Release-Note: >Audit-Trail: >Unformatted: