Hi! Git revision 4a020a8 [aka. SVN 189359], the large header reordering patch, broke m68k-linux (.../configure --target=m68k-linux --prefix=... --enable-languages=c --disable-threads) for me:
[...] gcc -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno -long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -I. -I. -I../../../../gcc/gcc -I../../../../gcc/gcc/. -I../../../../gcc/gcc/../include -I../../../../gcc/gcc/../libcpp/include -I../../../../gcc/gcc/../libdecnumber -I../../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber ../../../../gcc/gcc/resource.c -o resource.o ../../../../gcc/gcc/resource.c: In function ‘init_resource_info’: ../../../../gcc/gcc/resource.c:1179:5: error: ‘current_function_decl’ undeclared (first use in this function) ../../../../gcc/gcc/resource.c:1179:5: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [resource.o] Error 1 I suggest the following patch, which is only compile-tested. MfG, JBG 2012-07-11 Jan-Benedict Glaw <jbg...@lug-owl.de> * config/m68k/m68k.c (m68k_epilogue_uses): New. * config/m68k/m68k.h (m68k_epilogue_uses): Use new function instead of former macro. * config/m68k/m68k-protos.h (m68k_epilogue_uses): Declare. diff --git a/gcc/config/m68k/m68k-protos.h b/gcc/config/m68k/m68k-protos.h index c779588..16ad157 100644 --- a/gcc/config/m68k/m68k-protos.h +++ b/gcc/config/m68k/m68k-protos.h @@ -99,3 +99,4 @@ extern void init_68881_table (void); extern rtx m68k_legitimize_call_address (rtx); extern rtx m68k_legitimize_sibcall_address (rtx); extern int m68k_hard_regno_rename_ok(unsigned int, unsigned int); +extern bool m68k_epilogue_uses (unsigned int regno); diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index df70560..d07ee18 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -6506,4 +6506,14 @@ m68k_init_sync_libfuncs (void) init_sync_libfuncs (UNITS_PER_WORD); } +/* Implement EPILOGUE_USES. */ + +bool +m68k_epilogue_uses (unsigned int regno ATTRIBUTE_UNUSED) +{ + return (reload_completed + && (m68k_get_function_kind (current_function_decl) + == m68k_fk_interrupt_handler)); +} + #include "gt-m68k.h" diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index b8d8d9c..4c3bb1b 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -803,10 +803,7 @@ do { if (cc_prev_status.flags & CC_IN_68881) \ #define INCOMING_FRAME_SP_OFFSET 4 /* All registers are live on exit from an interrupt routine. */ -#define EPILOGUE_USES(REGNO) \ - (reload_completed \ - && (m68k_get_function_kind (current_function_decl) \ - == m68k_fk_interrupt_handler)) +#define EPILOGUE_USES(REGNO) m68k_epilogue_uses (REGNO) /* Describe how we implement __builtin_eh_return. */ #define EH_RETURN_DATA_REGNO(N) \ -- Jan-Benedict Glaw jbg...@lug-owl.de +49-172-7608481 Signature of: Don't believe in miracles: Rely on them! the second :
signature.asc
Description: Digital signature