Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-39735

gcc: Cannot make struct sockaddr aliasing-compatible if LTO is enabled [rhel-9]

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-9.5
    • rhel-9.5
    • gcc
    • None
    • gcc-11.5.0-2.el9
    • None
    • None
    • 1
    • sst_pt_gcc
    • ssg_platform_tools
    • 27
    • 27
    • 1
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • GCC Sprint 9
    • Unspecified Release Note Type - Unknown
    • All
    • None

      Under RHEL-38861, we are implementing the POSIX rules for struct sockaddr type-based aliasing analysis. It has come to our intention that this approach is not fully compatible with -flto.

      • Bug 114493 - [11/12/13/14/15 Regression] internal compiler error: in fld_incomplete_type_of with may_alias

      The reproducer is quite simple. Compiling it with -flto is enough:

      typedef struct git_midx_writer git_midx_writer;
      int git_futils_rmdir_flags;
      int __attribute__git_midx_writer_new(git_midx_writer **);
      struct __attribute__((__may_alias__)) git_midx_writer {};

       

            mpolacek@redhat.com Marek Polacek
            fweimer@redhat.com Florian Weimer
            Marek Polacek Marek Polacek
            Vaclav Kadlcik Vaclav Kadlcik
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: