re PR target/12281 (not emiting function which is static and marked as inline)

2003-09-21  Andrew Pinski  <pinskia@physics.uc.edu>

        PR target/12281
        * config/darwin.c (machopic_validate_stub_or_non_lazy_ptr): Call
        mark_referenced instead of setting TREE_SYMBOL_REFERENCED.

2003-09-21  Andrew Pinski  <pinskia@physics.uc.edu>

        PR target/12281
        * gcc.c-torture/compile/20030921-1.c: New test.

From-SVN: r71648
This commit is contained in:
Andrew Pinski 2003-09-22 07:18:09 +00:00 committed by Andrew Pinski
parent de582cfbb9
commit af0f185b1b
4 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2003-09-21 Andrew Pinski <pinskia@physics.uc.edu>
PR target/12281
* config/darwin.c (machopic_validate_stub_or_non_lazy_ptr): Call
mark_referenced instead of setting TREE_SYMBOL_REFERENCED.
2003-09-22 Olivier Hainque <hainque@act-europe.fr>
PR target/9786

View File

@ -398,12 +398,12 @@ machopic_validate_stub_or_non_lazy_ptr (const char *name, int validate_stub)
original symbol as being referenced. */
TREE_USED (temp) = 1;
if (TREE_CODE (TREE_VALUE (temp)) == IDENTIFIER_NODE)
TREE_SYMBOL_REFERENCED (TREE_VALUE (temp)) = 1;
mark_referenced (TREE_VALUE (temp));
real_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
real_name = darwin_strip_name_encoding (real_name);
id2 = maybe_get_identifier (real_name);
if (id2)
TREE_SYMBOL_REFERENCED (id2) = 1;
mark_referenced (id2);
}
}

View File

@ -1,3 +1,8 @@
2003-09-21 Andrew Pinski <pinskia@physics.uc.edu>
PR target/12281
* gcc.c-torture/compile/20030921-1.c: New test.
2003-09-22 Eric Botcazou <ebotcazou@libertysurf.fr>
* g++.dg/opt/reg-stack2.C: New test.

View File

@ -0,0 +1,10 @@
/* PR 12281 The darwin back-end was causing the function
f is not being emitted. TREE_SYMBOL_REFERENCED was being set
instead of calling mark_referenced. */
static void f(void);
void g(void (*x) (void)){x();}
static inline void f(void){}
void h(){g(f);}
int main(){h();return 0;}