except.c (can_convert_eh): Don't check template parms, typename types etc.
cp: * except.c (can_convert_eh): Don't check template parms, typename types etc. testsuite: * g++.old-deja/g++.eh/crash6.C: New test. From-SVN: r41628
This commit is contained in:
parent
02a1a68c6a
commit
2d46ec8394
@ -1,3 +1,8 @@
|
||||
2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* except.c (can_convert_eh): Don't check template parms,
|
||||
typename types etc.
|
||||
|
||||
2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* optimize.c (maybe_clone_body): Copy parameter names and locations.
|
||||
|
@ -821,7 +821,7 @@ can_convert_eh (to, from)
|
||||
/* else fall through */
|
||||
}
|
||||
|
||||
if (IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from)
|
||||
if (CLASS_TYPE_P (to) && CLASS_TYPE_P (from)
|
||||
&& PUBLICLY_UNIQUELY_DERIVED_P (to, from))
|
||||
return 1;
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* g++.old-deja/g++.eh/crash6.C: New test.
|
||||
|
||||
2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* g++.old-deja/g++.other/warn7.C: New test.
|
||||
|
26
gcc/testsuite/g++.old-deja/g++.eh/crash6.C
Normal file
26
gcc/testsuite/g++.old-deja/g++.eh/crash6.C
Normal file
@ -0,0 +1,26 @@
|
||||
// Build don't link:
|
||||
//
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 26 April 2001 <nathan@codesourcery.com>
|
||||
// Origin: schmid@snake.iap.physik.tu-darmstadt.de
|
||||
|
||||
// Bug 2368. When checking shadowed catchers, we didn't ignore
|
||||
// template type parms etc, leading to an ICE
|
||||
|
||||
template<class CatchType1, class CatchType2>
|
||||
void call(int& a)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
}
|
||||
catch (CatchType1&)
|
||||
{
|
||||
|
||||
}
|
||||
catch (CatchType2&)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user