Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 168587 - sys-devel/gcc-4.1.1 - gcj gives a segmentation fault when compiling with -fprofile-arcs flag
Summary: sys-devel/gcc-4.1.1 - gcj gives a segmentation fault when compiling with -fpr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-27 15:31 UTC by Stephen Torri
Modified: 2009-04-20 00:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Torri 2007-02-27 15:31:03 UTC
When I attempt to compile a java source file with gcj and use the -fprofile-arcs flag I get a segmentation fault.

Reproducible: Always

Steps to Reproduce:
1. gcj --main Fibonacci Fibonacci.java -fprofile-arcs


Actual Results:  
storri@base ~/Documents/StephenTorri/comp6210 $ gcj --main=Fibonacci Fibonacci.java -fprofile-arcs
Fibonacci.java:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.


Expected Results:  
Program to compile.

class Fibonacci {

        public int calculate ( int n )
        {
                int output = 0;

                if ( n > 1 )
                {
                        output = calculate ( n - 1 ) + calculate ( n - 2 );
                }
                else
                {
                        output = n;
                }

                return output;
        }

        public static void main ( String[] inc )
        {
                if ( inc.length > 0 )
                {
                        Fibonacci f_ref = new Fibonacci();

                        int n = Integer.parseInt(inc[0]);
                        while ( n != -1 )
                        {
                                System.out.println( "Calculated fibonacci number: " + f_ref.calculate ( n ) );
                                n--;
                        }
                }
                return;
        }
}

---------------------------------
storri@base ~/Documents/StephenTorri/comp6210 $ emerge --info
Portage 2.1.2-r9 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r6 i686)
=================================================================
System uname: 2.6.18-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 27 Feb 2007 08:50:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://lug.mtu.edu/gentoo ftp://ftp.ndlug.nd.edu/pub/gentoo/"
LINGUAS="en en_GB"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X berkdb bitmap-fonts cli cracklib crypt cups dbus dri fortran gdbm gpm hal iconv ipv6 isdnlog kdeenablefinal kdexdeltas libg++ midi ncurses nls nptl nptlonly pam pcre perl pic ppds pppd python readline reflection session spl ssl tcpd truetype truetype-fonts type1-fonts unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" USERLAND="GNU" VIDEO_CARDS="nv vga"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Mark Loeser (RETIRED) gentoo-dev 2009-04-20 00:37:43 UTC
This works fine with gcc-4.3