public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/105009] New: [12 Regression] Fails to build with --target=xtensa-esp32-elf
@ 2022-03-22 2:12 bero at lindev dot ch
2022-03-22 8:44 ` [Bug middle-end/105009] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: bero at lindev dot ch @ 2022-03-22 2:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105009
Bug ID: 105009
Summary: [12 Regression] Fails to build with
--target=xtensa-esp32-elf
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: bero at lindev dot ch
Target Milestone: ---
Trying to build gcc 12 (snapshot 20220313) with --target=xtensa-esp32-elf fails
because tree_to_poly_int64, tree_to_poly_uint64, tree_to_shwi and tree_to_uhwi
are implemented in both gcc/tree.h and gcc/tree.cc:
../../gcc/tree.cc:3222:1: error: redefinition of a 'extern inline' function
'tree_to_poly_int64' is not supported in C++
tree_to_poly_int64 (const_tree t)
^
../../gcc/tree.h:4691:1: note: previous definition is here
tree_to_poly_int64 (const_tree t)
^
../../gcc/tree.cc:3231:1: error: redefinition of a 'extern inline' function
'tree_to_poly_uint64' is not supported in C++
tree_to_poly_uint64 (const_tree t)
^
../../gcc/tree.h:4698:1: note: previous definition is here
tree_to_poly_uint64 (const_tree t)
^
../../gcc/tree.cc:6350:1: error: redefinition of a 'extern inline' function
'tree_to_shwi' is not supported in C++
tree_to_shwi (const_tree t)
^
../../gcc/tree.h:4677:1: note: previous definition is here
tree_to_shwi (const_tree t)
^
../../gcc/tree.cc:6361:1: error: redefinition of a 'extern inline' function
'tree_to_uhwi' is not supported in C++
tree_to_uhwi (const_tree t)
^
../../gcc/tree.h:4684:1: note: previous definition is here
tree_to_uhwi (const_tree t)
^
Simply commenting out/removing the extra definitions in gcc/tree.h seems to be
sufficient to fix the problem.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/105009] [12 Regression] Fails to build with --target=xtensa-esp32-elf
2022-03-22 2:12 [Bug middle-end/105009] New: [12 Regression] Fails to build with --target=xtensa-esp32-elf bero at lindev dot ch
@ 2022-03-22 8:44 ` rguenth at gcc dot gnu.org
2022-03-22 17:05 ` jakub at gcc dot gnu.org
2022-03-23 8:12 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-22 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105009
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Target| |xtensa-esp32-elf
Target Milestone|--- |12.0
CC| |rguenth at gcc dot gnu.org
Last reconfirmed| |2022-03-22
Status|UNCONFIRMED |WAITING
Keywords| |build
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's declared
extern inline __attribute__ ((__gnu_inline__)) poly_int64
tree_to_poly_int64 (const_tree t)
{
gcc_assert (tree_fits_poly_int64_p (t));
return TREE_INT_CST_LOW (t);
}
which should be OK in principle but of course it depends on the host compiler.
What host compiler are you using?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/105009] [12 Regression] Fails to build with --target=xtensa-esp32-elf
2022-03-22 2:12 [Bug middle-end/105009] New: [12 Regression] Fails to build with --target=xtensa-esp32-elf bero at lindev dot ch
2022-03-22 8:44 ` [Bug middle-end/105009] " rguenth at gcc dot gnu.org
@ 2022-03-22 17:05 ` jakub at gcc dot gnu.org
2022-03-23 8:12 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-22 17:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105009
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That message is clearly from clang++, when I try:
extern inline __attribute__ ((__gnu_inline__)) int
tree_to_poly_int64 (int i)
{
return i + 1;
}
int
tree_to_poly_int64 (int i)
{
return i + 2;
}
clang++ complains:
error: redefinition of a 'extern inline' function 'tree_to_poly_int64' is not
supported in C++
Those inlines in tree.h are guarded with
#if !defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 4003)
and
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
If you are using the ill-designed -fgnuc-version= option for clang, don't.
While I've added a hack for it for libstdc++ headers, there is no way we are
going to do this everywhere in GCC sources itself.
__GNUC__ macro doesn't mean support for GNU extensions, it means using the GCC
compiler or at least something compatible with it up to the version, which
perhaps ICC more/less is, but clang certainly is not.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/105009] [12 Regression] Fails to build with --target=xtensa-esp32-elf
2022-03-22 2:12 [Bug middle-end/105009] New: [12 Regression] Fails to build with --target=xtensa-esp32-elf bero at lindev dot ch
2022-03-22 8:44 ` [Bug middle-end/105009] " rguenth at gcc dot gnu.org
2022-03-22 17:05 ` jakub at gcc dot gnu.org
@ 2022-03-23 8:12 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-23 8:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105009
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Invalid then, you might want to report this to clang.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-23 8:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 2:12 [Bug middle-end/105009] New: [12 Regression] Fails to build with --target=xtensa-esp32-elf bero at lindev dot ch
2022-03-22 8:44 ` [Bug middle-end/105009] " rguenth at gcc dot gnu.org
2022-03-22 17:05 ` jakub at gcc dot gnu.org
2022-03-23 8:12 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).