Commit 0fba566c by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/41893 (ICE with -combine and debug)

	PR debug/41893
	* cfgexpand.c (expand_debug_expr): Don't attempt to create DECL_RTL
	for a VOIDmode variable.

	* gcc.dg/debug/pr41893-1.c: New test.
	* gcc.dg/debug/pr41893-2.c: New file.

From-SVN: r153806
parent 9789ba46
2009-11-02 Jakub Jelinek <jakub@redhat.com>
PR debug/41893
* cfgexpand.c (expand_debug_expr): Don't attempt to create DECL_RTL
for a VOIDmode variable.
PR c++/41774
* c-pragma.c (visstack): Change into vector of ints rather than
enum symbol_visibility.
......@@ -2349,7 +2349,8 @@ expand_debug_expr (tree exp)
|| DECL_EXTERNAL (exp)
|| !TREE_STATIC (exp)
|| !DECL_NAME (exp)
|| DECL_HARD_REGISTER (exp))
|| DECL_HARD_REGISTER (exp)
|| mode == VOIDmode)
return NULL;
op0 = DECL_RTL (exp);
......
2009-11-02 Jakub Jelinek <jakub@redhat.com>
PR debug/41893
* gcc.dg/debug/pr41893-1.c: New test.
* gcc.dg/debug/pr41893-2.c: New file.
PR c++/41774
* g++.dg/ext/visibility/namespace3.C: New test.
......
/* PR debug/41893 */
/* { dg-do compile } */
/* { dg-options "-combine -fwhole-program -O" } */
/* { dg-additional-sources "pr41893-2.c" } */
struct S { int v; };
struct S s;
void __attribute__((externally_visible))
func1 (void)
{
struct S *p = &s;
}
/* PR debug/41893 */
/* { dg-do compile } */
extern struct S s;
void
func2 (void)
{
&s;
}
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