https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #54 from Jonathan Wakely ---
Oh, and for completeness, GCC 8.1.0 -fabi-version=11 also prints a garbage
value of course:
1:2:3:4:5:4195842:6:7:8:9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
Jonathan Wakely changed:
What|Removed |Added
Target Milestone|--- |8.0
--- Comment #53 from Jonathan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #52 from H.J. Lu ---
*** Bug 69846 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
Marek Polacek changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #50 from Marek Polacek ---
Author: mpolacek
Date: Wed Nov 22 16:06:18 2017
New Revision: 255066
URL: https://gcc.gnu.org/viewcvs?rev=255066=gcc=rev
Log:
PR c++/60336
PR middle-end/67239
PR target/68355
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
Marek Polacek changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
Andrew Pinski changed:
What|Removed |Added
Target Milestone|6.5 |---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
Richard Biener changed:
What|Removed |Added
Target Milestone|6.4 |6.5
--- Comment #48 from Richard
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
Jakub Jelinek changed:
What|Removed |Added
Target Milestone|6.3 |6.4
--- Comment #47 from Jakub Jelinek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
Richard Biener changed:
What|Removed |Added
Target Milestone|6.2 |6.3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
Jakub Jelinek changed:
What|Removed |Added
Target Milestone|6.0 |6.2
--- Comment #46 from Jakub Jelinek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #45 from H.J. Lu ---
I opened a clang bug:
https://llvm.org/bugs/show_bug.cgi?id=26337
I propose the following definitions:
i. An empty record is:
1. A class without member. Or
2. An array of empty records. Or
3. A
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
H.J. Lu changed:
What|Removed |Added
Attachment #36723|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #44 from H.J. Lu ---
*** Bug 68355 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #42 from H.J. Lu ---
(In reply to H.J. Lu from comment #29)
> (In reply to Andrew Pinski from comment #27)
> > Comment on attachment 36720 [details]
> > A patch
> >
> > How does this interact with LTO where
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #39 from Andrew Pinski ---
You should also update gimplify.c's zero_sized_type to be the same as your
empty_record_p.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #40 from H.J. Lu ---
(In reply to H.J. Lu from comment #38)
> Created attachment 36724 [details]
> An updated patch to add empty_record_p
>
> I am testing it now.
It doesn't work since it misses
for (binfo = TYPE_BINFO (type),
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #41 from H.J. Lu ---
(In reply to Andrew Pinski from comment #39)
> You should also update gimplify.c's zero_sized_type to be the same as your
> empty_record_p.
It won't work since the size of empty class isn't zero in C++. We
just
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #25 from H.J. Lu ---
(In reply to Andrew Pinski from comment #23)
> (In reply to H.J. Lu from comment #22)
> > This is a target independent issue. Clang++ skips empty struct argument
> > and g++ passes it. Skip empty struct argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #30 from Andrew Pinski ---
(In reply to H.J. Lu from comment #29)
> (In reply to Andrew Pinski from comment #27)
> > Comment on attachment 36720 [details]
> > A patch
> >
> > How does this interact with LTO where
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #31 from H.J. Lu ---
(In reply to Andrew Pinski from comment #30)
>
> Isn't an empty record is one without any field decls?
I thin it is language specific.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #27 from Andrew Pinski ---
Comment on attachment 36720
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36720
A patch
How does this interact with LTO where lang_hooks.decls.empty_record_p is not
defined?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #34 from Andrew Pinski ---
(In reply to H.J. Lu from comment #33)
> (In reply to Andrew Pinski from comment #32)
> > (In reply to H.J. Lu from comment #31)
> > > (In reply to Andrew Pinski from comment #30)
> > > >
> > > > Isn't an
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #29 from H.J. Lu ---
(In reply to Andrew Pinski from comment #27)
> Comment on attachment 36720 [details]
> A patch
>
> How does this interact with LTO where lang_hooks.decls.empty_record_p is not
> defined?
We can stream out empty
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
H.J. Lu changed:
What|Removed |Added
Attachment #36720|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #26 from H.J. Lu ---
Created attachment 36720
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36720=edit
A patch
I am testing this patch.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
H.J. Lu changed:
What|Removed |Added
Target Milestone|--- |6.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #33 from H.J. Lu ---
(In reply to Andrew Pinski from comment #32)
> (In reply to H.J. Lu from comment #31)
> > (In reply to Andrew Pinski from comment #30)
> > >
> > > Isn't an empty record is one without any field decls?
> >
> > I
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #32 from Andrew Pinski ---
(In reply to H.J. Lu from comment #31)
> (In reply to Andrew Pinski from comment #30)
> >
> > Isn't an empty record is one without any field decls?
>
> I thin it is language specific.
How so? An record
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
H.J. Lu changed:
What|Removed |Added
Attachment #36721|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #35 from H.J. Lu ---
(In reply to Andrew Pinski from comment #34)
>
> So no FIELD_DECL as part of fields; only var or type or method_decl?
struct dummy { };
struct true_type { struct dummy i; };
gave:
(gdb) cal debug_tree (type)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #37 from Andrew Pinski ---
(In reply to H.J. Lu from comment #35)
> (In reply to Andrew Pinski from comment #34)
> >
> > So no FIELD_DECL as part of fields; only var or type or method_decl?
>
> struct dummy { };
> struct true_type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #38 from H.J. Lu ---
Created attachment 36724
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36724=edit
An updated patch to add empty_record_p
I am testing it now.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
H.J. Lu hjl.tools at gmail dot com changed:
What|Removed |Added
Component|target |c++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #23 from Andrew Pinski pinskia at gcc dot gnu.org ---
(In reply to H.J. Lu from comment #22)
This is a target independent issue. Clang++ skips empty struct argument
and g++ passes it. Skip empty struct argument requires middle-end
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
--- Comment #24 from vagran vagran.ast at gmail dot com ---
Just to be on a safe side, please, also do not forget that empty struct (or
class) is really zero in the case when another structure (or class) is derived
from it. For example, such test
37 matches
Mail list logo