https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80986
--- Comment #8 from linzj ---
(In reply to Anssi Hannula from comment #7)
> Created attachment 46772 [details]
> Simple testcase for the issue
>
> The regression still exists on GCC trunk.
>
> We also hit the issue with
> https://github.com/goo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80986
Anssi Hannula changed:
What|Removed |Added
CC||anssi.hannula at bitwise dot fi
--- Comm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80986
--- Comment #6 from Ramana Radhakrishnan ---
(In reply to linzj from comment #5)
> Is the following patch okay? Or should I add the new bit to indicate not to
> remove an attribute?
> diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
> index f8436b30b37..97
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80986
--- Comment #5 from linzj ---
Is the following patch okay? Or should I add the new bit to indicate not to
remove an attribute?
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index f8436b30b37..97bc82272af 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -73
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80986
Ramana Radhakrishnan changed:
What|Removed |Added
CC||ramana at gcc dot gnu.org
--- Com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80986
--- Comment #3 from linzj ---
Hi Pinskia,
This bug can be fix easily. Can you commit the fix patch?
--
Lin Zuojian
2017-06-07 9:45 GMT+08:00 pinskia at gcc dot gnu.org
:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80986
>
> Andrew Pinski
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80986
--- Comment #2 from linzj ---
I have found the cause of this bug.
In 5.3, the function strip_typedefs only use
result = cp_build_type_attribute_variant (result, TYPE_ATTRIBUTES (t));
but in 6.3 remove_attributes prediction get invovled:
if (TYP
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80986
--- Comment #1 from linzj ---
>From the peek of -fdump-tree-tu-all, the translation unit already get the
function_type wrong. Before use the auto, the function type has the attribute
pcs. But after the auto use, the function type has dropped the