Commit cac67c08 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/34619 (ICE with "-fmudflap" and templates)

	PR c++/34619
	* cgraphunit.c (cgraph_build_static_cdtor): set_cfun back to NULL
	before returning.

	* testsuite/libmudflap.c++/pass61-frag.cxx: New test.

From-SVN: r131302
parent e0658eda
2008-01-03 Jakub Jelinek <jakub@redhat.com> 2008-01-03 Jakub Jelinek <jakub@redhat.com>
PR c++/34619
* cgraphunit.c (cgraph_build_static_cdtor): set_cfun back to NULL
before returning.
PR tree-optimization/29484 PR tree-optimization/29484
* tree-inline.c (inline_forbidden_p_2): New function. * tree-inline.c (inline_forbidden_p_2): New function.
(inline_forbidden_p): Disallow inlining if some static var (inline_forbidden_p): Disallow inlining if some static var
/* Callgraph based interprocedural optimizations. /* Callgraph based interprocedural optimizations.
Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Jan Hubicka Contributed by Jan Hubicka
This file is part of GCC. This file is part of GCC.
...@@ -1515,6 +1516,7 @@ cgraph_build_static_cdtor (char which, tree body, int priority) ...@@ -1515,6 +1516,7 @@ cgraph_build_static_cdtor (char which, tree body, int priority)
cgraph_add_new_function (decl, false); cgraph_add_new_function (decl, false);
cgraph_mark_needed_node (cgraph_node (decl)); cgraph_mark_needed_node (cgraph_node (decl));
set_cfun (NULL);
} }
void void
......
2008-01-03 Jakub Jelinek <jakub@redhat.com>
PR c++/34619
* testsuite/libmudflap.c++/pass61-frag.cxx: New test.
2008-01-01 Volker Reichelt <v.reichelt@netcologne.de> 2008-01-01 Volker Reichelt <v.reichelt@netcologne.de>
PR libmudflap/26442 PR libmudflap/26442
......
// PR c++/34619
// { dg-do compile }
template <typename> struct A
{
typedef int X;
static const int N = 1;
};
template <typename T> struct B
{
typedef typename A <int [A <T>::N]>::X Y;
template <typename U> B (Y, U) {}
};
int main ()
{
}
B <int>b (0, 0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment