This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Include facility for .md files - altivec patches
On Nov 6, 2001, Alan Matsuoka <alanm@redhat.com> wrote:
> *** gensupport.c 2001/10/25 12:55:16 1.23
> --- gensupport.c 2001/11/06 15:51:44
> *************** process_rtx (desc, lineno)
> *** 164,169 ****
> --- 322,329 ----
> rtx desc;
> int lineno;
> {
> + const char *filename = XSTR (desc, 0);
> +
> switch (GET_CODE (desc))
> {
> case DEFINE_INSN:
> *************** process_rtx (desc, lineno)
> *** 178,183 ****
> --- 338,348 ----
> queue_pattern (desc, &define_attr_tail, lineno);
> break;
> + case INCLUDE:
> + if (process_include (desc, lineno) == FATAL_EXIT_CODE)
> + message_with_line (lineno, "include file at %s not found\n", filename);
> + break;
> +
> case DEFINE_INSN_AND_SPLIT:
> {
> const char *split_cond;
Alan, you can't assume any RTL will have a string in the first field.
I caught this by chance, when I enabled all checking, to help track
a GC bug I'm hunting. More about it later.
I'm checking this in, as obviously correct (built on
athlon-pc-linux-gnu).
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* gensupport.c (process_rtx): Don't assume filename is the first
argument of any rtl.
Index: gcc/gensupport.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gensupport.c,v
retrieving revision 1.25
diff -u -p -r1.25 gensupport.c
--- gcc/gensupport.c 2001/11/15 16:50:46 1.25
+++ gcc/gensupport.c 2001/11/16 22:55:28
@@ -324,8 +324,6 @@ process_rtx (desc, lineno)
rtx desc;
int lineno;
{
- const char *filename = XSTR (desc, 0);
-
switch (GET_CODE (desc))
{
case DEFINE_INSN:
@@ -342,7 +340,11 @@ process_rtx (desc, lineno)
case INCLUDE:
if (process_include (desc, lineno) == FATAL_EXIT_CODE)
- message_with_line (lineno, "include file at %s not found\n", filename);
+ {
+ const char *filename = XSTR (desc, 0);
+ message_with_line (lineno, "include file at %s not found\n",
+ filename);
+ }
break;
case DEFINE_INSN_AND_SPLIT:
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me