public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98895] New: C++ module generates too many dead code
@ 2021-01-29 21:46 unlvsur at live dot com
  2021-01-29 21:49 ` [Bug c++/98895] " unlvsur at live dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: unlvsur at live dot com @ 2021-01-29 21:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98895

            Bug ID: 98895
           Summary: C++ module generates too many dead code
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

It is a general issue. Any module unit will generate a dead entry that is
completely unused.

If those issues cannot be solved, I am sorry, I would only say C++20 modules
failed completely.

I do not think it has anything to do with tree-optimizations. The compiler just
should NOT emit any code to the middle-end because of the module tbh. The
module should not affect how the assembly is generated.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/98895] C++ module generates too many dead code
  2021-01-29 21:46 [Bug c++/98895] New: C++ module generates too many dead code unlvsur at live dot com
@ 2021-01-29 21:49 ` unlvsur at live dot com
  2021-01-30  9:38 ` pilarlatiesa at gmail dot com
  2022-11-03 13:12 ` ppalka at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: unlvsur at live dot com @ 2021-01-29 21:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98895

cqwrteur <unlvsur at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |All
               Host|                            |All

--- Comment #1 from cqwrteur <unlvsur at live dot com> ---
#include<stdio.h>
inline void test(char const* str) noexcept
{
    puts(str);
}

int main()
{
    test("Hello\n");
}

hello.cc
module;
#include<stdio.h>
export module hello;

export inline void test(char const* str) noexcept
{
    puts(str);
}


main.cc
import hello;

int main()
{
    test("Hello\n");
}


The 2nd generates a larger binary because it emits dead module entry.

Please remove all dead code thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/98895] C++ module generates too many dead code
  2021-01-29 21:46 [Bug c++/98895] New: C++ module generates too many dead code unlvsur at live dot com
  2021-01-29 21:49 ` [Bug c++/98895] " unlvsur at live dot com
@ 2021-01-30  9:38 ` pilarlatiesa at gmail dot com
  2022-11-03 13:12 ` ppalka at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pilarlatiesa at gmail dot com @ 2021-01-30  9:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98895

--- Comment #2 from Pilar Latiesa <pilarlatiesa at gmail dot com> ---
(In reply to cqwrteur from comment #0)

> If those issues cannot be solved, I am sorry, I would only say C++20 modules
> failed completely.

What do you expect from being so offensive? Is this comment necessary at all?
Do you realize that some people have devoted several years of work to have the
feature ready for us to use it for free?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/98895] C++ module generates too many dead code
  2021-01-29 21:46 [Bug c++/98895] New: C++ module generates too many dead code unlvsur at live dot com
  2021-01-29 21:49 ` [Bug c++/98895] " unlvsur at live dot com
  2021-01-30  9:38 ` pilarlatiesa at gmail dot com
@ 2022-11-03 13:12 ` ppalka at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-11-03 13:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98895

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org
         Resolution|---                         |FIXED
   Target Milestone|---                         |13.0
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
I suspect this is fixed on trunk by r13-1090-ge8609768fbbc1e

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-03 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 21:46 [Bug c++/98895] New: C++ module generates too many dead code unlvsur at live dot com
2021-01-29 21:49 ` [Bug c++/98895] " unlvsur at live dot com
2021-01-30  9:38 ` pilarlatiesa at gmail dot com
2022-11-03 13:12 ` ppalka 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).