public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/15734] New: internal compiler error: Segmentation fault
@ 2004-05-30 15:51 dolfi at zkm dot de
  2004-05-30 15:52 ` [Bug java/15734] " dolfi at zkm dot de
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dolfi at zkm dot de @ 2004-05-30 15:51 UTC (permalink / raw)
  To: java-prs

Dear GCJ guru,

Compiling a small class created with scala 1.1.1.3 
(http://scala.epfl.ch/downloads/Web_Installers/InstData/Linux/NoVM/install.bin)
I get this message:

~$ scalac Factorial.scala 
~$ gcj --CLASSPATH=/usr/local/Scala/lib Factorial.class 

Factorial.scala: In class `Factorial':
Factorial.scala: In method `Factorial.fact_rec(int)':
Factorial.scala:14: internal compiler error: Segmentation fault

The scala source is below. Unfortunately, there is no way to send you the .class
files created by scalac with this web form. You can either reply to me so I can
send you the rest, or install scala from the above URL -- it's simple ;)

Sorry, can't figure out what a host/target/buid triplet is: I've built gcc with
the 3.3.2 gcc installed on Mandrake 10.0 Linux, kernel 2.6.3-4mdk.

gcj -v gives:
Reading specs from /home/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Reading specs from
/home/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/../../../libgcj.spec
rename spec lib to liborig
Configured with: ../configure --enable-language=c,c++,f77,java
Thread model: posix
gcc version 3.4.0


object Factorial with Application {

  def fact_rec(n: Int): Int =
    if (n == 0) 1
    else n * fact_rec(n - 1);

  def fact_tail(n: Int): Int =
    if (n == 0) 1
    else {
      def iter(x: Int, result: Int): Int =
        if (x > n) result
        else iter(x + 1, result * x);
      iter(1, 1)
    };

  def fact_iter(n: Int): Int = {
    var i = n;
    var prod = 1;
    while (i > 0) {
      prod = prod * i;
      i = i - 1
    }
    prod
  }

  Console.println("fact_rec(5) = " + fact_rec(5));
  Console.println("fact_rec(10) = " + fact_rec(10));
  Console.println;

  Console.println("fact_tail(5) = " + fact_tail(5));
  Console.println("fact_tail(10) = " + fact_tail(10));
  Console.println;

  Console.println("fact_iter(5) = " + fact_iter(5));
  Console.println("fact_iter(10) = " + fact_iter(10));
}

-- 
           Summary: internal compiler error: Segmentation fault
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dolfi at zkm dot de
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15734


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-06-26 20:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-30 15:51 [Bug java/15734] New: internal compiler error: Segmentation fault dolfi at zkm dot de
2004-05-30 15:52 ` [Bug java/15734] " dolfi at zkm dot de
2004-05-30 15:53 ` pinskia at gcc dot gnu dot org
2004-05-30 15:59 ` dolfi at zkm dot de
2004-05-30 16:20 ` pinskia at gcc dot gnu dot org
2004-05-31 14:59 ` dolfi at zkm dot de
2004-06-01 22:30 ` pinskia at gcc dot gnu dot org
2004-06-26  0:09 ` pinskia at gcc dot gnu dot org
2004-06-26 20:42 ` cvs-commit at gcc dot gnu dot org
2004-06-26 20:45 ` mckinlay at redhat dot com
2004-06-26 20:45 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).