From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22132 invoked by alias); 15 May 2003 18:06:01 -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 22096 invoked by uid 71); 15 May 2003 18:06:00 -0000 Resent-Date: 15 May 2003 18:06:00 -0000 Resent-Message-ID: <20030515180600.22095.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, sdowning@fame.com Received: (qmail 18660 invoked by uid 48); 15 May 2003 18:04:07 -0000 Message-Id: <20030515180407.18659.qmail@sources.redhat.com> Date: Thu, 15 May 2003 18:06:00 -0000 From: sdowning@fame.com Reply-To: sdowning@fame.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: target/10806: Illegal instruction calling function in shared object on AIX X-SW-Source: 2003-05/txt/msg01809.txt.bz2 List-Id: >Number: 10806 >Category: target >Synopsis: Illegal instruction calling function in shared object on AIX >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu May 15 18:06:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Stuart Downing >Release: 3.2.2 >Organization: >Environment: powerpc-ibm-aix5.1.0.0 >Description: These modules demonstrate a bug in gcc 3.2.2 on AIX 5.1. The symptom is an illegal instruction when the foo function is called when mod.o is converted to a shared object. I did quite a bit of dividing and conquering from my original code to get to this result. I've done some further dividing and conquering from here to see that the symptom goes away if any of the following changes are made... * if static_ptr is not initialized. * if static_ptr is not static * if function_static is not static * if mod.o is not converted to shared (see unshared test) To demonstrate the symptom run make This will build two test programs, one using the non-shared object, the other using the shared object, then it runs both. Here's the output from gcc -v for me... gcc -v Reading specs from /usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.2.2/specs Configured with: ../gcc-3.2.2/configure --disable-nls Thread model: aix gcc version 3.2.2 (I downloaded a binary gcc distro from http://aixpdslib.seas.ucla.edu) Note - I didn't gcc -v -save-temps since the test case is self contained. Feel free to contact me if you need more details Stuart Downing FAME Information Services, Inc. sdowning at fame dot com >How-To-Repeat: unzip, untar and make. The shared test program will core dump with an illegal instruction. >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/x-gzip; name="gccbug.tar.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gccbug.tar.gz" H4sICMfVwz4AA2djY2J1Zy50YXIA7Vdbb9s2FM5r+CsOggFJikqWZVcGXBRYkCZYHrICzTYMGIaC pmiZm0SqJGXXG/rfd0hKTlI0y8ucoAO/F1o8Fx6eK10xtuiq0TX9ky9FzQ/2gXGWFcUUDrJsPAlr lk2KsDpMixlks6LIZvmsmOLv8bSYTA8g24s1X6Azlmo0xZRqI4WsHuIr+br9Nz3hKrBbvxGcn7+p GIPkF5ikeZoTYrmxc+ikWVHNSwgLOfyes5WCo5/7/SNymI4Gph315pbWU8jAM4dGlamChgqZMnL4 3cn5+Skk6vakQAlshAxSYf2a4H2x4cRb2VT1Z+5keomdrNMaTvNLYL89gvXfZM21EUrOd5Q1ee6w /WeoQv2/vzh7e32xpzMeqf88n2V9/U/yIi9c/WeTWaz/p8BPK264S/Su5gZK3ihprKaWAwVMDBAS XH/wzQGUhLOrX+FVOk4JQUkw26a1qgFhgEoQdc0rWqMMquiYxZqBzYpLsMi6VAqWnQy7yM8ocpfE 00NrcJtKYrFZLFKr0IC+YNXiD84sHnkFpSjhYyeCecKCWuLWWpQYOLSgdAo+dly7z6VGw5otKC0q IdEspkqOeknFrVNvV3ig5qarbQpwdbzmUCqJd1INWttpNFo/pJx45cjgFILhuKyo9fccXFIp9Cfd 0C2IJUpvnanBD3WtNk4HW1FZOSbU0tCSp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