Commit 2896d056 by Zack Weinberg

re PR c/10178 (ICE in tree_low_cst)

	PR 10178
	* langhooks.h (struct lang_hooks): Add no_body_blocks bool.
	* langhooks-def.h (LANG_HOOKS_NO_BODY_BLOCKS): New; default false.
	* c-lang.c, objc/objc-lang.c: Override LANG_HOOKS_NO_BODY_BLOCKS
	to true.
	* stmt.c (is_body_block): If lang_hooks.no_body_blocks, always
	return 0.

From-SVN: r68483
parent 8f7193b8
2003-06-25 Zack Weinberg <zack@codesourcery.com>
PR 10178
* langhooks.h (struct lang_hooks): Add no_body_blocks bool.
* langhooks-def.h (LANG_HOOKS_NO_BODY_BLOCKS): New; default false.
* c-lang.c, objc/objc-lang.c: Override LANG_HOOKS_NO_BODY_BLOCKS
to true.
* stmt.c (is_body_block): If lang_hooks.no_body_blocks, always
return 0.
2003-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2003-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (bt-load.o): Depend on $(TM_P_H). * Makefile.in (bt-load.o): Depend on $(TM_P_H).
...@@ -87,18 +97,18 @@ Wed Jun 25 11:31:59 CEST 2003 Jan Hubicka <jh@suse.cz> ...@@ -87,18 +97,18 @@ Wed Jun 25 11:31:59 CEST 2003 Jan Hubicka <jh@suse.cz>
Back out these patches: Back out these patches:
2003-06-02 J"orn Rennecke <joern.rennecke@superh.com> 2003-06-02 J"orn Rennecke <joern.rennecke@superh.com>
* sh.h (OLD_ARG_MODE): New macro. * sh.h (OLD_ARG_MODE): New macro.
(FUNCTION_ARG_ADVANCE, FUNCTION_ARG_PASS_BY_REFERENCE): Use it. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG_PASS_BY_REFERENCE): Use it.
(FUNCTION_ARG_1): Break out of: (FUNCTION_ARG_1): Break out of:
(FUNCTION_ARG). Use OLD_ARG_MODE. (FUNCTION_ARG). Use OLD_ARG_MODE.
2003-06-06 J"orn Rennecke <joern.rennecke@superh.com> 2003-06-06 J"orn Rennecke <joern.rennecke@superh.com>
* sh.h (FUNCTION_ARG_1): Consistently use NEW_MODE for the mode * sh.h (FUNCTION_ARG_1): Consistently use NEW_MODE for the mode
of the generated register. of the generated register.
* sh.h (FUNCTION_ARG_SCmode_WART): Define. * sh.h (FUNCTION_ARG_SCmode_WART): Define.
(FUNCTION_ARG): Unless FUNCTION_ARG_SCmode_WART is defined and (FUNCTION_ARG): Unless FUNCTION_ARG_SCmode_WART is defined and
an even number of floating point regs are in use, use the same an even number of floating point regs are in use, use the same
sequence of argument passing registers for SCmode as would be sequence of argument passing registers for SCmode as would be
used for two SFmode values. used for two SFmode values.
* sh.c (sh_va_arg): If FUNCTION_ARG_SCmode_WART is defined, * sh.c (sh_va_arg): If FUNCTION_ARG_SCmode_WART is defined,
swap real / imaginary parts in incoming SCmode values passed swap real / imaginary parts in incoming SCmode values passed
...@@ -106,8 +116,8 @@ Wed Jun 25 11:31:59 CEST 2003 Jan Hubicka <jh@suse.cz> ...@@ -106,8 +116,8 @@ Wed Jun 25 11:31:59 CEST 2003 Jan Hubicka <jh@suse.cz>
2003-06-24 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> 2003-06-24 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
PR target/11260 PR target/11260
* config/alpha/alpha.md (sqrtdf2): Fix operand substitution. * config/alpha/alpha.md (sqrtdf2): Fix operand substitution.
Tue Jun 24 18:49:33 CEST 2003 Jan Hubicka <jh@suse.cz> Tue Jun 24 18:49:33 CEST 2003 Jan Hubicka <jh@suse.cz>
...@@ -167,7 +177,7 @@ Mon Jun 23 23:07:35 CEST 2003 Jan Hubicka <jh@suse.cz> ...@@ -167,7 +177,7 @@ Mon Jun 23 23:07:35 CEST 2003 Jan Hubicka <jh@suse.cz>
* cgraphunit.c (cgraph_finalize_function): Collect entry points here * cgraphunit.c (cgraph_finalize_function): Collect entry points here
instead of in cgraph_finalize_compilation_unit; constructors and instead of in cgraph_finalize_compilation_unit; constructors and
destructors are entry points. destructors are entry points.
(cgraph_finalize_compilation_unit): Reorganize debug outout; (cgraph_finalize_compilation_unit): Reorganize debug outout;
examine nested functions after lowerng; call collect_functions hook. examine nested functions after lowerng; call collect_functions hook.
(cgraph_mark_local_functions): DECL_COMDAT functions are not local. (cgraph_mark_local_functions): DECL_COMDAT functions are not local.
(cgraph_finalize_compilation_unit): Do not collect entry points. (cgraph_finalize_compilation_unit): Do not collect entry points.
...@@ -237,7 +247,7 @@ Mon Jun 23 23:07:35 CEST 2003 Jan Hubicka <jh@suse.cz> ...@@ -237,7 +247,7 @@ Mon Jun 23 23:07:35 CEST 2003 Jan Hubicka <jh@suse.cz>
* sched-deps.c: Likewise. * sched-deps.c: Likewise.
2003-06-23 Roger Sayle <roger@eyesopen.com> 2003-06-23 Roger Sayle <roger@eyesopen.com>
Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* doc/contrib.texi (Contributors): Add a note on testing and * doc/contrib.texi (Contributors): Add a note on testing and
remove duplicates from testers list. remove duplicates from testers list.
......
...@@ -67,6 +67,8 @@ static int c_init_options (void); ...@@ -67,6 +67,8 @@ static int c_init_options (void);
#define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval #define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval
#undef LANG_HOOKS_STATICP #undef LANG_HOOKS_STATICP
#define LANG_HOOKS_STATICP c_staticp #define LANG_HOOKS_STATICP c_staticp
#undef LANG_HOOKS_NO_BODY_BLOCKS
#define LANG_HOOKS_NO_BODY_BLOCKS true
#undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
#define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl
#undef LANG_HOOKS_PRINT_IDENTIFIER #undef LANG_HOOKS_PRINT_IDENTIFIER
......
...@@ -107,6 +107,7 @@ void write_global_declarations PARAMS ((void)); ...@@ -107,6 +107,7 @@ void write_global_declarations PARAMS ((void));
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME lhd_set_decl_assembler_name #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME lhd_set_decl_assembler_name
#define LANG_HOOKS_CAN_USE_BIT_FIELDS_P lhd_can_use_bit_fields_p #define LANG_HOOKS_CAN_USE_BIT_FIELDS_P lhd_can_use_bit_fields_p
#define LANG_HOOKS_HONOR_READONLY false #define LANG_HOOKS_HONOR_READONLY false
#define LANG_HOOKS_NO_BODY_BLOCKS false
#define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing #define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing
#define LANG_HOOKS_PRINT_XNODE lhd_print_tree_nothing #define LANG_HOOKS_PRINT_XNODE lhd_print_tree_nothing
#define LANG_HOOKS_PRINT_DECL lhd_print_tree_nothing #define LANG_HOOKS_PRINT_DECL lhd_print_tree_nothing
...@@ -266,6 +267,7 @@ int lhd_tree_dump_type_quals PARAMS ((tree)); ...@@ -266,6 +267,7 @@ int lhd_tree_dump_type_quals PARAMS ((tree));
LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, \ LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, \
LANG_HOOKS_CAN_USE_BIT_FIELDS_P, \ LANG_HOOKS_CAN_USE_BIT_FIELDS_P, \
LANG_HOOKS_HONOR_READONLY, \ LANG_HOOKS_HONOR_READONLY, \
LANG_HOOKS_NO_BODY_BLOCKS, \
LANG_HOOKS_PRINT_STATISTICS, \ LANG_HOOKS_PRINT_STATISTICS, \
LANG_HOOKS_PRINT_XNODE, \ LANG_HOOKS_PRINT_XNODE, \
LANG_HOOKS_PRINT_DECL, \ LANG_HOOKS_PRINT_DECL, \
......
...@@ -328,6 +328,11 @@ struct lang_hooks ...@@ -328,6 +328,11 @@ struct lang_hooks
/* Nonzero if TYPE_READONLY and TREE_READONLY should always be honored. */ /* Nonzero if TYPE_READONLY and TREE_READONLY should always be honored. */
bool honor_readonly; bool honor_readonly;
/* Nonzero if this front end does not generate a dummy BLOCK between
the outermost scope of the function and the FUNCTION_DECL. See
is_body_block in stmt.c, and its callers. */
bool no_body_blocks;
/* The front end can add its own statistics to -fmem-report with /* The front end can add its own statistics to -fmem-report with
this hook. It should output to stderr. */ this hook. It should output to stderr. */
void (*print_statistics) PARAMS ((void)); void (*print_statistics) PARAMS ((void));
......
...@@ -65,6 +65,8 @@ static int objc_init_options PARAMS ((void)); ...@@ -65,6 +65,8 @@ static int objc_init_options PARAMS ((void));
#define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval #define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval
#undef LANG_HOOKS_STATICP #undef LANG_HOOKS_STATICP
#define LANG_HOOKS_STATICP c_staticp #define LANG_HOOKS_STATICP c_staticp
#undef LANG_HOOKS_NO_BODY_BLOCKS
#define LANG_HOOKS_NO_BODY_BLOCKS true
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
#undef LANG_HOOKS_PRINT_IDENTIFIER #undef LANG_HOOKS_PRINT_IDENTIFIER
......
...@@ -3511,6 +3511,9 @@ int ...@@ -3511,6 +3511,9 @@ int
is_body_block (stmt) is_body_block (stmt)
tree stmt; tree stmt;
{ {
if (lang_hooks.no_body_blocks)
return 0;
if (TREE_CODE (stmt) == BLOCK) if (TREE_CODE (stmt) == BLOCK)
{ {
tree parent = BLOCK_SUPERCONTEXT (stmt); tree parent = BLOCK_SUPERCONTEXT (stmt);
......
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