diff mbox series

Call decl_default_tls_model with a proper type (PR gcov-profile/88279).

Message ID bc10c53f-6f12-fa66-f139-7bb5540977f7@suse.cz
State New
Headers show
Series Call decl_default_tls_model with a proper type (PR gcov-profile/88279). | expand

Commit Message

Martin Liška Nov. 30, 2018, 1:45 p.m. UTC
Hi.

This is quite obvious fix where I mixed type and variable
when calling decl_default_tls_model.

I'm testing the patch on x86_64-linux-gnu.

Ready for trunk?
Thanks,
Martin

gcc/ChangeLog:

2018-11-30  Alexander Monakov  <amonakov@ispras.ru>

	PR gcov-profile/88279
	* tree-profile.c (init_ic_make_global_vars): Call
	decl_default_tls_model for variable and not it's type.
---
 gcc/tree-profile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Hubicka Nov. 30, 2018, 2:52 p.m. UTC | #1
> Hi.
> 
> This is quite obvious fix where I mixed type and variable
> when calling decl_default_tls_model.
> 
> I'm testing the patch on x86_64-linux-gnu.
> 
> Ready for trunk?
> Thanks,
> Martin
> 
> gcc/ChangeLog:
> 
> 2018-11-30  Alexander Monakov  <amonakov@ispras.ru>
> 
> 	PR gcov-profile/88279
> 	* tree-profile.c (init_ic_make_global_vars): Call
> 	decl_default_tls_model for variable and not it's type.
OK, thanks!
Honza
> ---
>  gcc/tree-profile.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 

> diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
> index 48204423eaf..506e00d6e90 100644
> --- a/gcc/tree-profile.c
> +++ b/gcc/tree-profile.c
> @@ -111,7 +111,7 @@ init_ic_make_global_vars (void)
>    DECL_INITIAL (ic_tuple_var) = NULL;
>    DECL_EXTERNAL (ic_tuple_var) = 1;
>    if (targetm.have_tls)
> -    set_decl_tls_model (ic_tuple_var, decl_default_tls_model (tuple_type));
> +    set_decl_tls_model (ic_tuple_var, decl_default_tls_model (ic_tuple_var));
>  }
>  
>  /* Create the type and function decls for the interface with gcov.  */
>
diff mbox series

Patch

diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 48204423eaf..506e00d6e90 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -111,7 +111,7 @@  init_ic_make_global_vars (void)
   DECL_INITIAL (ic_tuple_var) = NULL;
   DECL_EXTERNAL (ic_tuple_var) = 1;
   if (targetm.have_tls)
-    set_decl_tls_model (ic_tuple_var, decl_default_tls_model (tuple_type));
+    set_decl_tls_model (ic_tuple_var, decl_default_tls_model (ic_tuple_var));
 }
 
 /* Create the type and function decls for the interface with gcov.  */