This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70001] [5/6 regression] Infinity compilation time
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Mar 2016 12:22:19 +0000
- Subject: [Bug c++/70001] [5/6 regression] Infinity compilation time
- Auto-submitted: auto-generated
- References: <bug-70001-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70001
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 37924
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37924&action=edit
gcc6-pr70001.patch
So do you mean something like this? The *-2.C testcase is what I believe
you've been talking about and indeed Patrick's patch broke that.
I'm still wondering if there could be dependency on this even without
relocation, but e.g. for:
constexpr __UINTPTR_TYPE__ foo (void *p) { return (__UINTPTR_TYPE__) p; }
struct X
{
__UINTPTR_TYPE__ a;
constexpr X () : a (foo (this)) { }
};
constexpr signed char bar (void *p) { return (signed char) (__UINTPTR_TYPE__)
p; }
struct Y
{
signed char a;
constexpr Y () : a (bar (this)) { }
};
constexpr int N = 1 << 4;
struct A { X elems[N]; } F;
struct B { Y elems[N]; } G;
with (unpatched) g++ F contains relocations and G contains all zeros. clang++
3.8 rejects both constexpr functions as having reinterpret cast, so maybe that
just isn't valid (shall g++ reject that too)?