public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/36631] [4.3/4.4 Regression] attribute always_inline -> sorry, unimplemented: recursive inlining
Date: Mon, 15 Sep 2008 14:28:00 -0000 [thread overview]
Message-ID: <20080915142700.18784.qmail@sourceware.org> (raw)
In-Reply-To: <bug-36631-16302@http.gcc.gnu.org/bugzilla/>
------- Comment #5 from rguenth at gcc dot gnu dot org 2008-09-15 14:26 -------
This looks like a frontend bug to me. For B::g we record in the DECL_ARGUMENTS
(gdb) call debug_tree (p)
<parm_decl 0x7fae5daa2f30 c
type <record_type 0x7fae5d15da80 C addressable needs-constructing type_1
type_5 BLK
with DECL_ARG_TYPE (p) being
<record_type 0x7fae5d15da80 C addressable needs-constructing type_1 type_5 BLK
size <integer_cst 0x7fae5da9c7b0 type <integer_type 0x7fae5daaf0c0
bit_size_type> constant invariant 8>
but we pass it a reference in trigger():
(gdb) call debug_tree (*$1)
<addr_expr 0x7fae5d15f580
type <reference_type 0x7fae5d163540
type <record_type 0x7fae5d15da80 C addressable needs-constructing
type_1 type_5 BLK
like so:
(gdb) call debug_generic_expr (*expr_p)
g (&b, &TARGET_EXPR <D.2065, <<< Unknown tree: aggr_init_expr
5
__comp_ctor
D.2065
0B
(const struct C &) (const struct C *) (struct C *) c >>>
>)
which leads to (rightfully) CALL_CANNOT_INLINE_P set. The TYPE_ARG_TYPES
also require a record for the arguments.
So either the function call is wrong or DECL_ARG_TYPE and TYPE_ARG_TYPES
are not correct. The offending frontend code doing this is
convert_for_arg_passing which has
/* Pass classes with copy ctors by invisible reference. */
else if (TREE_ADDRESSABLE (type))
val = build1 (ADDR_EXPR, build_reference_type (type), val);
but it doesn't communicate this to the middle-end.
Jason, can you shed some light on when/if/why not C++ is setting
DECL_ARG_TYPE to what? Thanks.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu dot org
AssignedTo|rguenth at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36631
next prev parent reply other threads:[~2008-09-15 14:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-25 17:08 [Bug c++/36631] New: [4.3 " josep dot m dot perez at bsc dot es
2008-07-04 21:50 ` [Bug c++/36631] [4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-07-10 14:24 ` [Bug tree-optimization/36631] " rguenth at gcc dot gnu dot org
2008-07-31 14:45 ` hubicka at gcc dot gnu dot org
2008-08-07 15:26 ` rguenth at gcc dot gnu dot org
2008-08-27 22:10 ` jsm28 at gcc dot gnu dot org
2008-09-15 14:28 ` rguenth at gcc dot gnu dot org [this message]
2008-09-15 14:38 ` [Bug c++/36631] " rguenth at gcc dot gnu dot org
2008-10-21 12:16 ` jakub at gcc dot gnu dot org
2008-11-04 16:05 ` jakub at gcc dot gnu dot org
2008-11-04 16:45 ` jakub at gcc dot gnu dot org
2008-11-20 1:50 ` jakub at gcc dot gnu dot org
2008-11-20 1:52 ` [Bug c++/36631] [4.3 " jakub at gcc dot gnu dot org
2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
2009-08-04 12:41 ` rguenth at gcc dot gnu dot org
2010-05-22 18:25 ` rguenth at gcc dot gnu dot org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080915142700.18784.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).