This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs 1.0.1 internal compiler error


304 ~/cs750/regexp/c++ chen@jonas$ c++ -v
Reading specs from /usr/lib/gcc-lib/i386-linux/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
305 ~/cs750/regexp/c++ chen@jonas$ uname -a
Linux jonas 2.0.32 #19 Mon Dec 15 01:07:50 EST 1997 i586 unknown

c++ -Wall -O -I.   -c bug.cc -o bug.o
bug.cc: In method `bool Times1Matcher::match(const char *)
const::Times2Matcher::match(const char *) const':
bug.cc:47: Internal compiler error.
bug.cc:47: Please submit a full bug report to `egcs-bugs@cygnus.com'.

class Matcher {
  public:
  virtual bool match(const char* s) const = 0;
};

class Trans {
  public:
  virtual const Matcher* trans(const Matcher* k) const = 0;
};

class Regexp {
  public:
  virtual const Trans* buildUnstaged() const = 0;
};

class Times1Matcher : public Matcher {
  private:
  const Regexp* const r1;
  const Regexp* const r2;
  const Matcher* const k;
  public:
  Times1Matcher(const Regexp* r1,
                const Regexp* r2,
                const Matcher* k)
    : r1(r1), r2(r2), k(k) {}

  virtual bool match(const char* s) const {
    class Times2Matcher : public Matcher {
      private:
      const Regexp* const r2;
      const Matcher* const k;
      public:
      Times2Matcher(const Regexp* r2, const Matcher* k)
        : r2(r2), k(k) {}

      virtual bool match(const char* s) const {
        return r2->buildUnstaged()->trans(k)->match(s);
      }
    };

    return r1->buildUnstaged()->
      trans(new Times2Matcher(r2, k))->match(s);
  }
};

class Foo {
};

-- 
Franklin Chen                     mailto:chen+@cs.cmu.edu
Graduate Student                  http://www.cs.cmu.edu/~chen/
Computer Science Department       Wean Hall 8218
Carnegie Mellon University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]