public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114982] New: [15 Regression] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin.
@ 2024-05-08  6:54 iains at gcc dot gnu.org
  2024-05-08  6:57 ` [Bug testsuite/114982] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: iains at gcc dot gnu.org @ 2024-05-08  6:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114982
           Summary: [15 Regression] New test
                    g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin.
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

The call to __cxa_atexit is elided on Darwin.

The rules for what binds locally on Mach-O might be in error (but I think that
they are subtly different from ELF).

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

* [Bug testsuite/114982] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin.
  2024-05-08  6:54 [Bug c++/114982] New: [15 Regression] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin iains at gcc dot gnu.org
@ 2024-05-08  6:57 ` pinskia at gcc dot gnu.org
  2024-05-08  7:24 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-08  6:57 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |testsuite-fail
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
   Last reconfirmed|                            |2024-05-08
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think this is just a testsuite issue.

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

* [Bug testsuite/114982] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin.
  2024-05-08  6:54 [Bug c++/114982] New: [15 Regression] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin iains at gcc dot gnu.org
  2024-05-08  6:57 ` [Bug testsuite/114982] " pinskia at gcc dot gnu.org
@ 2024-05-08  7:24 ` pinskia at gcc dot gnu.org
  2024-05-08  7:28 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-08  7:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So I was going for the elf semantics here but Mach-O semantics says the
function is NOT replacable unless it was weak.

Anyways this is just a dg-skip-if for darwin and I will add it with a note
saying locally defined functions are not replacable.

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

* [Bug testsuite/114982] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin.
  2024-05-08  6:54 [Bug c++/114982] New: [15 Regression] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin iains at gcc dot gnu.org
  2024-05-08  6:57 ` [Bug testsuite/114982] " pinskia at gcc dot gnu.org
  2024-05-08  7:24 ` pinskia at gcc dot gnu.org
@ 2024-05-08  7:28 ` pinskia at gcc dot gnu.org
  2024-05-19 13:33 ` cvs-commit at gcc dot gnu.org
  2024-05-28 22:36 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-08  7:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like the testcase should also be skipped for mingw/cygwin too.
```
  /* External public symbols, which aren't weakref-s,
     have local-binding for PE targets.  */
  if (DECL_P (exp)
      && !lookup_attribute ("weakref", DECL_ATTRIBUTES (exp))
      && TREE_PUBLIC (exp)
      && DECL_EXTERNAL (exp))
    return true;
```

I will double that. Though those targets might not have __cxa_atexit in the
first place so it might be less of an issue. Maybe cygwin does due to its usage
of newlib.

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

* [Bug testsuite/114982] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin.
  2024-05-08  6:54 [Bug c++/114982] New: [15 Regression] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin iains at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-05-08  7:28 ` pinskia at gcc dot gnu.org
@ 2024-05-19 13:33 ` cvs-commit at gcc dot gnu.org
  2024-05-28 22:36 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-19 13:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:

https://gcc.gnu.org/g:1073469074ff132478ec8d923ed8635c672f7d9b

commit r15-651-g1073469074ff132478ec8d923ed8635c672f7d9b
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Sat May 11 09:24:33 2024 +0100

    testsuite, C++, Darwin: Skip cxa_atexit-6, which is not applicable.

    For Darwin, non-weak functions defined in a TU always bind locally
    and so cxa_atexit-6.C is not applicable here.

            PR testsuite/114982

    gcc/testsuite/ChangeLog:

            * g++.dg/tree-ssa/cxa_atexit-6.C: Skip for Darwin.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

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

* [Bug testsuite/114982] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin.
  2024-05-08  6:54 [Bug c++/114982] New: [15 Regression] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin iains at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-05-19 13:33 ` cvs-commit at gcc dot gnu.org
@ 2024-05-28 22:36 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-28 22:36 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |15.0
             Status|ASSIGNED                    |RESOLVED
            Version|14.0                        |15.0
         Resolution|---                         |FIXED

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2024-05-28 22:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-08  6:54 [Bug c++/114982] New: [15 Regression] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin iains at gcc dot gnu.org
2024-05-08  6:57 ` [Bug testsuite/114982] " pinskia at gcc dot gnu.org
2024-05-08  7:24 ` pinskia at gcc dot gnu.org
2024-05-08  7:28 ` pinskia at gcc dot gnu.org
2024-05-19 13:33 ` cvs-commit at gcc dot gnu.org
2024-05-28 22:36 ` pinskia 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).