This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
But what if gcc -fwhole-program -fsmart-opt figures out that thread_func is only ever used as a thread function called by ptread_create and therefore argument passed to it can't reference&a and thus p != q can be optimized as 1?
__thread int a;
int *pa;
...
int main()
{
pa = &a;
...
}| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |