Bug 108631 - gcc/rust/backend/rust-constexpr.cc:2099:33: error: too few arguments to function ‘tree_node* Rust::Compile::unshare_constructor(tree, const char*, int, const char*)’ with --enable-gather-detailed-mem-stats
Summary: gcc/rust/backend/rust-constexpr.cc:2099:33: error: too few arguments to funct...
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: rust (show other bugs)
Version: 13.0
: P3 normal
Target Milestone: ---
Assignee: Arthur Cohen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-01 13:07 UTC by Martin Liška
Modified: 2023-02-22 13:22 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2023-02-09 00:00:00


Attachments
Patch candidate (1.45 KB, patch)
2023-02-01 13:07 UTC, Martin Liška
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2023-02-01 13:07:13 UTC
With --enable-gather-detailed-mem-stats enabled I get since r13-5533-ge66fec8e6ba35e:

../../gcc/rust/backend/rust-constexpr.cc: In function ‘tree_node* Rust::Compile::eval_constant_expression(const constexpr_ctx*, tree, bool, bool*, bool*, tree_node**)’:
../../gcc/rust/backend/rust-constexpr.cc:2099:33: error: too few arguments to function ‘tree_node* Rust::Compile::unshare_constructor(tree, const char*, int, const char*)’
 2099 |         r = unshare_constructor (r);
      |             ~~~~~~~~~~~~~~~~~~~~^~~
../../gcc/rust/backend/rust-constexpr.cc:87:1: note: declared here
   87 | unshare_constructor (tree t MEM_STAT_DECL);
      | ^~~~~~~~~~~~~~~~~~~
../../gcc/rust/backend/rust-constexpr.cc:2149:40: error: too few arguments to function ‘tree_node* Rust::Compile::unshare_constructor(tree, const char*, int, const char*)’
 2149 |             init = unshare_constructor (init);
      |                    ~~~~~~~~~~~~~~~~~~~~^~~~~~
../../gcc/rust/backend/rust-constexpr.cc:87:1: note: declared here
   87 | unshare_constructor (tree t MEM_STAT_DECL);
      | ^~~~~~~~~~~~~~~~~~~
../../gcc/rust/backend/rust-constexpr.cc: In function ‘tree_node* Rust::Compile::eval_store_expression(const constexpr_ctx*, tree, bool, bool*, bool*)’:
../../gcc/rust/backend/rust-constexpr.cc:2933:30: error: too few arguments to function ‘tree_node* Rust::Compile::unshare_constructor(tree, const char*, int, const char*)’
 2933 |   init = unshare_constructor (init);
      |          ~~~~~~~~~~~~~~~~~~~~^~~~~~
../../gcc/rust/backend/rust-constexpr.cc:87:1: note: declared here
   87 | unshare_constructor (tree t MEM_STAT_DECL);
      | ^~~~~~~~~~~~~~~~~~~
../../gcc/rust/backend/rust-constexpr.cc: In function ‘tree_node* Rust::Compile::eval_call_expression(const constexpr_ctx*, tree, bool, bool*, bool*)’:
../../gcc/rust/backend/rust-constexpr.cc:3555:45: error: too few arguments to function ‘tree_node* Rust::Compile::unshare_constructor(tree, const char*, int, const char*)’
 3555 |                   arg = unshare_constructor (arg);
      |                         ~~~~~~~~~~~~~~~~~~~~^~~~~
../../gcc/rust/backend/rust-constexpr.cc:87:1: note: declared here
   87 | unshare_constructor (tree t MEM_STAT_DECL);
      | ^~~~~~~~~~~~~~~~~~~
../../gcc/rust/backend/rust-constexpr.cc: In function ‘long int Rust::Compile::find_array_ctor_elt(tree, tree, bool)’:
../../gcc/rust/backend/rust-constexpr.cc:4282:49: error: too few arguments to function ‘tree_node* Rust::Compile::unshare_constructor(tree, const char*, int, const char*)’
 4282 |                   e.value = unshare_constructor (value);
      |                             ~~~~~~~~~~~~~~~~~~~~^~~~~~~
../../gcc/rust/backend/rust-constexpr.cc:4170:1: note: declared here
 4170 | unshare_constructor (tree t MEM_STAT_DECL)
      | ^~~~~~~~~~~~~~~~~~~
../../gcc/rust/backend/rust-constexpr.cc:4298:49: error: too few arguments to function ‘tree_node* Rust::Compile::unshare_constructor(tree, const char*, int, const char*)’
 4298 |                   e.value = unshare_constructor (value);
      |                             ~~~~~~~~~~~~~~~~~~~~^~~~~~~
../../gcc/rust/backend/rust-constexpr.cc:4170:1: note: declared here
 4170 | unshare_constructor (tree t MEM_STAT_DECL)
Comment 1 Martin Liška 2023-02-01 13:07:59 UTC
Created attachment 54384 [details]
Patch candidate

Please check what you get with -fmem-report with the suggested patch.
Comment 2 Arthur Cohen 2023-02-09 14:55:51 UTC
Patch looks good to me Martin, thank you. Will you push it directly?
Comment 3 Martin Liška 2023-02-09 15:17:19 UTC
(In reply to Arthur Cohen from comment #2)
> Patch looks good to me Martin, thank you. Will you push it directly?

Do you see reasonable allocations when you run -fmem-report w/ --enable-gather-detailed-mem-stats? Please push it yourself.