[C++] Recent regression ICE with default params

Nathan Sidwell nathan@acm.org
Wed Feb 16 08:20:00 GMT 2000


Hi,
the attached test case, culled from gtk--, causes an ICE.

nathan@uha:54>./cc1plus nathan104.ii 
 void foo (const string &) void bar (const string &) void baz (const string &)
nathan104.ii:19: Internal compiler error in `fix_lexical_addr', at function.c:5339

It appears that
2000-01-19  Mark Mitchell  <mark@codesourcery.com>

        * tree.c (bot_manip): Set DECL_CONTEXT for newly created
        VAR_DECLs.

It's something to do with the default argument to set_navigation.
Yes, you do need all three of foo, bar & baz to tickle this problem.

nathan

-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
Never hand someone a gun unless you are sure where they will point it
nathan@acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan@cs.bris.ac.uk
// Build don't link:

// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 15 Feb 2000 <nathan@acm.org>

// culled from gtk--, caused ICE

// crash test - XFAIL *-*-*

struct string
{
  string ();
};

void set_navigation(const string& str,const string& =string());

void foo(const string &str)
  {
    set_navigation(str);
  }
void bar(const string &str)
  {
    set_navigation(str);
  }
void baz(const string &str)
 {
    set_navigation(str);
 }


More information about the Gcc-bugs mailing list