From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13414 invoked by alias); 31 Mar 2010 14:49:10 -0000 Received: (qmail 13404 invoked by uid 22791); 31 Mar 2010 14:49:09 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from franklin.physics.purdue.edu (HELO mail.physics.purdue.edu) (128.210.146.222) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 31 Mar 2010 14:49:05 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.physics.purdue.edu (Postfix) with ESMTP id A6FF2ABE11A for ; Wed, 31 Mar 2010 10:49:03 -0400 (EDT) Received: from mail.physics.purdue.edu ([127.0.0.1]) by localhost (franklin.physics.purdue.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13864-10 for ; Wed, 31 Mar 2010 10:49:02 -0400 (EDT) Received: from io.physics.purdue.edu (io.physics.purdue.edu [128.210.146.165]) by mail.physics.purdue.edu (Postfix) with ESMTP id 27B74ABE0FC for ; Wed, 31 Mar 2010 10:49:02 -0400 (EDT) Message-ID: <4BB360DE.30102@physics.purdue.edu> Date: Wed, 31 Mar 2010 21:07:00 -0000 From: Glenn H Sembroski User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Correction: Seg fault when calling Fortran from C++ Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00359.txt.bz2 Opps, I left a BIND(C) in my fortran code snippet that shouldn't be there (I was trying this and that unsuccessfully to fix the problem. The corrected problem description follows: ***************************************************************************************** Hi all, I am having a problem where I get a segfault when my C++ main program calls a f77 entry point. I am using GCC4.1.2. The C++ is compiled with g++, the fortran with gfortran. I use the -ffixed-line-length-none -fno-automatic -fno-underscoring -fbounds-check options with gfortran. The code snippits look like: C++: . . //Initalize the seed: int k1=0; int k2=0; int lux=3; cout<