This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix g++-law/copy1.C regression
- To: rth at redhat dot com
- Subject: Re: fix g++-law/copy1.C regression
- From: John Wehle <john at feith dot com>
- Date: Mon, 30 Jul 2001 18:05:49 -0400 (EDT)
- Cc: gcc-patches at gcc dot gnu dot org, jh at suse dot cz
> > It appears to return either 1 or a random value. Perhaps a patch to the
> > test is in order?
>
> No, C++ apparently has this silly implicit-return-0-from-main
> thing. Worse, someone thought C99 neeed this insanity as well.
Yuck :-(
The actual problem is merge_blocks is making a change and then returning
zero which prevents calculate_global_regs_live from being called again.
I'm in the process of testing the enclosed patch.
ChangeLog:
Thu Jul 26 21:23:14 EDT 2001 John Wehle (john@feith.com)
* flow.c (merge_blocks): Return 1 if an extra jump is inserted.
Enjoy!
-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/flow.c.ORIGINAL Mon Jul 30 17:17:59 2001
--- gcc/flow.c Mon Jul 30 17:50:56 2001
*************** merge_blocks (e, b, c, mode)
*** 3006,3011 ****
--- 3006,3013 ----
if (GET_CODE (barrier) != BARRIER)
abort ();
flow_delete_insn (barrier);
+
+ return 1;
}
return 0;
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------