diff options
author | Andreas Krebbel <krebbel1@de.ibm.com> | 2007-11-26 17:33:23 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2007-11-26 17:33:23 +0000 |
commit | 182e0d71f0e770fdcf6718538da7663b17597ee6 (patch) | |
tree | 5355897f41e887fd0f27f37fba51dcd93a9b5fb5 /gcc/function.c | |
parent | be0c460344d0077ede335b6121785f8cda2c7224 (diff) | |
download | gcc-182e0d71f0e770fdcf6718538da7663b17597ee6.zip gcc-182e0d71f0e770fdcf6718538da7663b17597ee6.tar.gz gcc-182e0d71f0e770fdcf6718538da7663b17597ee6.tar.bz2 |
PR 34081/C++
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* c-decl.c (store_parm_decls): Pass 'false' for the new
allocate_struct_function parameter.
* cgraphunit.c (cgraph_build_static_cdtor): Likewise.
* tree-parloops.c (create_loop_fn): Likewise.
* function.c (push_function_context_to, push_struct_function,
init_function_start): Likewise.
(allocate_struct_function): Add boolean parameter.
* tree.h (allocate_struct_function): Add boolean parameter.
* function.h (struct function): Move returns_struct and
returns_pcc_struct to the end of the structure definiton.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* trans.c (Subprogram_Body_to_gnu, Compilation_Unit_to_gnu):
Pass 'false' for the new allocate_struct_function parameter.
* utils.c (build_function_stub): Likewise.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* decl.c (finish_method): Pass 'false' for the new
allocate_struct_function parameter.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* treetree.c (tree_code_create_function_wrapup): Pass 'false'
for the new allocate_struct_function parameter.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* decl.c (start_preparsed_function): Pass
processing_template_decl for the new allocate_struct_function
parameter.
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
* g++.dg/template/dependent-expr6.C: New testcase.
From-SVN: r130441
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/function.c b/gcc/function.c index 249d715..fe70cbf 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -247,7 +247,7 @@ push_function_context_to (tree context ATTRIBUTE_UNUSED) struct function *p; if (cfun == 0) - allocate_struct_function (NULL); + allocate_struct_function (NULL, false); p = cfun; p->outer = outer_function_chain; @@ -3881,10 +3881,14 @@ get_next_funcdef_no (void) directly into cfun and invoke the back end hook explicitly at the very end, rather than initializing a temporary and calling set_cfun on it. -*/ + + ABSTRACT_P is true if this is a function that will never be seen by + the middle-end. Such functions are front-end concepts (like C++ + function templates) that do not correspond directly to functions + placed in object files. */ void -allocate_struct_function (tree fndecl) +allocate_struct_function (tree fndecl, bool abstract_p) { tree result; tree fntype = fndecl ? TREE_TYPE (fndecl) : NULL_TREE; @@ -3910,7 +3914,7 @@ allocate_struct_function (tree fndecl) cfun->decl = fndecl; result = DECL_RESULT (fndecl); - if (aggregate_value_p (result, fndecl)) + if (!abstract_p && aggregate_value_p (result, fndecl)) { #ifdef PCC_STATIC_STRUCT_RETURN current_function_returns_pcc_struct = 1; @@ -3943,7 +3947,7 @@ push_struct_function (tree fndecl) VEC_safe_push (function_p, heap, cfun_stack, cfun); if (fndecl) in_system_header = DECL_IN_SYSTEM_HEADER (fndecl); - allocate_struct_function (fndecl); + allocate_struct_function (fndecl, false); } /* Reset cfun, and other non-struct-function variables to defaults as @@ -3998,7 +4002,7 @@ init_function_start (tree subr) if (subr && DECL_STRUCT_FUNCTION (subr)) set_cfun (DECL_STRUCT_FUNCTION (subr)); else - allocate_struct_function (subr); + allocate_struct_function (subr, false); prepare_function_start (); /* Warn if this value is an aggregate type, |