This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,lto] Fix PR78562: Wrong type mismatch warning for built-ins with same asm name.
- From: Richard Biener <rguenther at suse dot de>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 30 Nov 2016 09:52:38 +0100 (CET)
- Subject: Re: [patch,lto] Fix PR78562: Wrong type mismatch warning for built-ins with same asm name.
- Authentication-results: sourceware.org; auth=none
- References: <1058a106-2dc6-095d-9f82-e5add2edce2e@gjlay.de>
On Tue, 29 Nov 2016, Georg-Johann Lay wrote:
> This is a fix for a wrong warning from -Wlto-type-mismatch that reports a type
> mismatch for two built-in functions.
>
> The avr backend has several built-ins that have the same asm name because
> their assembler implementation in libgcc is exactly the same. The prototypes
> might differ, however.
>
> This patch skips the warning for built-in types as discussed in
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78562#c6
>
> Testing against avr-unknown-none, this resolves all FAILs because of that
> warning, e.g. gcc.target/avr/torture/builtins-5-countlsfx.c
>
> Ok for trunk?
Ok.
Thanks,
Richard.
> Johann
>
> gcc/lto/
> PR lto/78562
> * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
> mismatch if the two types are built-in.
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)