public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/114529] New: profiledbootstrap fails to build and m2 causes odr violations during build
@ 2024-03-29  9:32 gaius at gcc dot gnu.org
  2024-03-29  9:32 ` [Bug modula2/114529] " gaius at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-03-29  9:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114529
           Summary: profiledbootstrap fails to build and m2 causes odr
                    violations during build
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: gaius at gcc dot gnu.org
  Target Milestone: ---

Many warnings are seen during compilation, starting with:

/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240324-r1/work/gcc-14-20240324/gcc/m2/mc-boot/GDynamicStrings.cc:109:8:
error: type Werror=odr][]]
  109 | struct DynamicStrings_Contents_r {
      |        ^
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240324-r1/work/gcc-14-20240324/gcc/m2/mc-boot/Gdecl.cc:834:8:
note: a different type is defined in another translation unit
  834 | struct DynamicStrings_Contents_r {
      |        ^
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240324-r1/work/gcc-14-20240324/gcc/m2/mc-boot/GDynamicStrings.cc:110:55:
note: the first difference of corresponding definitions is field ‘buf’
  110 |                                    DynamicStrings__T3 buf;
      |                                                       ^
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240324-r1/work/gcc-14-20240324/gcc/m2/mc-boot/Gdecl.cc:835:55:
note: a field of same name but different type is defined in another translation
unit
  835 |                                    DynamicStrings__T7 buf;
      |                                                       ^

Resulting in:

make[3]: Leaving directory
'/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240324-r1/work/build/gcc'
rm gfdl.pod gcc.pod gfortran.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod
gpl.pod cpp.pod gcov.pod lto-dump.pod gccgo.pod gdc.pod
make[2]: *** [Makefile:4878: all-stageprofile-gcc] Error 2 shuffle=1047648447
make[1]: *** [Makefile:31142: stageprofile-bubble] Error 2 shuffle=1047648447
make: *** [Makefile:31396: profiledbootstrap] Error 2 shuffle=1047648447
 * ERROR: sys-devel/gcc-14.0.1_pre20240324-r1::gentoo failed (compile phase):
 *   emake failed

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

* [Bug modula2/114529] profiledbootstrap fails to build and m2 causes odr violations during build
  2024-03-29  9:32 [Bug modula2/114529] New: profiledbootstrap fails to build and m2 causes odr violations during build gaius at gcc dot gnu.org
@ 2024-03-29  9:32 ` gaius at gcc dot gnu.org
  2024-04-02  8:58 ` arsen at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-03-29  9:32 UTC (permalink / raw)
  To: gcc-bugs

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

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2024-03-29

--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Confirmed.

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

* [Bug modula2/114529] profiledbootstrap fails to build and m2 causes odr violations during build
  2024-03-29  9:32 [Bug modula2/114529] New: profiledbootstrap fails to build and m2 causes odr violations during build gaius at gcc dot gnu.org
  2024-03-29  9:32 ` [Bug modula2/114529] " gaius at gcc dot gnu.org
@ 2024-04-02  8:58 ` arsen at gcc dot gnu.org
  2024-05-21 13:57 ` gaius at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: arsen at gcc dot gnu.org @ 2024-04-02  8:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
full build.log also:
https://dev.gentoo.org/~arsen/gcc-14.0.1_pre20240331-Werror-odr-build.log.gz

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

* [Bug modula2/114529] profiledbootstrap fails to build and m2 causes odr violations during build
  2024-03-29  9:32 [Bug modula2/114529] New: profiledbootstrap fails to build and m2 causes odr violations during build gaius at gcc dot gnu.org
  2024-03-29  9:32 ` [Bug modula2/114529] " gaius at gcc dot gnu.org
  2024-04-02  8:58 ` arsen at gcc dot gnu.org
@ 2024-05-21 13:57 ` gaius at gcc dot gnu.org
  2024-05-29 14:05 ` gaius at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-05-21 13:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Gaius Mulley <gaius at gcc dot gnu.org> ---
As an aid memoir the configure flags are:

../configure --prefix=$HOME/opt --enable-bootstrap
--with-build-config="bootstrap-O3 bootstrap-lto"
--enable-languages=c,c++,m2,lto

which provoke the odr violation.

m2/gm2-compiler-boot/M2Error.c:421:8: warning: type ‘struct
DynamicStrings_Contents_r’ violates the C++ One Definition Rule [-Wodr]
  421 | struct DynamicStrings_Contents_r {
      |        ^
m2/gm2-compiler-boot/M2GCCDeclare.c:708:8: note: a different type is defined in
another translation unit
  708 | struct DynamicStrings_Contents_r {
      |        ^
m2/gm2-compiler-boot/M2Error.c:422:55: note: the first difference of
corresponding definitions is field ‘buf’
  422 |                                    DynamicStrings__T5 buf;

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

* [Bug modula2/114529] profiledbootstrap fails to build and m2 causes odr violations during build
  2024-03-29  9:32 [Bug modula2/114529] New: profiledbootstrap fails to build and m2 causes odr violations during build gaius at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-05-21 13:57 ` gaius at gcc dot gnu.org
@ 2024-05-29 14:05 ` gaius at gcc dot gnu.org
  2024-06-06 13:24 ` gaius at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-05-29 14:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 58307
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58307&action=edit
Work in progress patch

This is only partially complete and it is being saved here to show the
direction of the fix.  The patch changes the bootstrap tool mc to track the
opaque types and treat an imported opaque type as (void *) and an opaque type
declared in an implementation module as typedef struct foo *bar etc.

Any exported procedure/variable/array/proctype using an opaque will use the
(void *) version and any local procedure/variable/array/proctype in the
implementation module uses the full struct * opaque declaration.   The patch
tracks opaque usage and casts appropriately.

The new .h files look correct and the .cc (or .c) files track variable,
parameter, proctype opaque usage - casting when necessary.

Record fields remain to be tracked.

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

* [Bug modula2/114529] profiledbootstrap fails to build and m2 causes odr violations during build
  2024-03-29  9:32 [Bug modula2/114529] New: profiledbootstrap fails to build and m2 causes odr violations during build gaius at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-05-29 14:05 ` gaius at gcc dot gnu.org
@ 2024-06-06 13:24 ` gaius at gcc dot gnu.org
  2024-06-08 19:57 ` gaius at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-06-06 13:24 UTC (permalink / raw)
  To: gcc-bugs

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

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #58307|0                           |1
        is obsolete|                            |

--- Comment #5 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 58369
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58369&action=edit
Work in progress patch v4

The patch (for mc) is still incomplete - the bootstrap tool now passes
translating 60 out of 61 modules and should avoid all ODR violations.

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

* [Bug modula2/114529] profiledbootstrap fails to build and m2 causes odr violations during build
  2024-03-29  9:32 [Bug modula2/114529] New: profiledbootstrap fails to build and m2 causes odr violations during build gaius at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-06-06 13:24 ` gaius at gcc dot gnu.org
@ 2024-06-08 19:57 ` gaius at gcc dot gnu.org
  2024-06-11  9:02 ` cvs-commit at gcc dot gnu.org
  2024-06-11  9:08 ` gaius at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-06-08 19:57 UTC (permalink / raw)
  To: gcc-bugs

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

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #58369|0                           |1
        is obsolete|                            |

--- Comment #6 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 58385
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58385&action=edit
Proposed fix v8

Here is a proposed patch which fixes the bootstrap tool to avoid all ODR
violations for auto generated (translated) sources.  A few ODR violations
remain in the hand written C/C++ interface files.   With this patch gm2
bootstraps using the configure line from above and all regression tests pass on
x86_64.

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

* [Bug modula2/114529] profiledbootstrap fails to build and m2 causes odr violations during build
  2024-03-29  9:32 [Bug modula2/114529] New: profiledbootstrap fails to build and m2 causes odr violations during build gaius at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-06-08 19:57 ` gaius at gcc dot gnu.org
@ 2024-06-11  9:02 ` cvs-commit at gcc dot gnu.org
  2024-06-11  9:08 ` gaius at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-11  9:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:a0004feb87efbe41fb1e9cd77f1c9af06e98ccb5

commit r15-1176-ga0004feb87efbe41fb1e9cd77f1c9af06e98ccb5
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Tue Jun 11 10:01:12 2024 +0100

    PR modula2/114529 Avoid ODR violations in bootstrap translated sources

    This patch changes the bootstrap tool mc to avoid redefining any data
    types and therefore preventing ODR violations.  All exported opaque type
    usages are implemented as void *.  Local opaque type usages (static
    functions containing opaque type parameters) use the full declaration.
    mc casts usages between void * and full opaque type as necessary.
    The --extended-opaque option in mc has been disabled, as this generated
    ODR violations.  The extended-opaque option inlined all declarations in
    the translated implementation module.  As this is no longer used there
    is now a .h file for each .def file and a .cc file for every .mod file.
    This results in more Makefile rules for the ppg tool in Make-maintainer.in.

    gcc/m2/ChangeLog:

            PR modula2/114529
            * Make-lang.in (MC_EXTENDED_OPAQUE): Assign to nothing.
            * Make-maintainer.in (mc-basetest): New rule.
            (mc-devel-basetest): New rule.
            (mc-clean): Remove mc.
            (m2/mc-boot-gen/$(SRC_PREFIX)decl.cc): Replace --extended-opaque
            with $(EXTENDED_OPAQUE).
            (PG-SRC): Move define before generic rules.
            (PGE-DEF): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)%.h): New rule.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)libc.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)mcrts.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)UnixArgs.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)Selective.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)termios.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)SysExceptions.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)ldtoa.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)wrapc.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)SYSTEM.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)errno.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)M2RTS.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)SymbolKey.h): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)SymbolKey.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)NameKey.h): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)NameKey.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)Lists.h): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)Lists.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)Output.h): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)bnflex.h): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)bnflex.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)RTco.h): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)RTentity.h): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)RTco.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)RTentity.o): Ditto.
            (m2/gm2-ppg-boot/$(SRC_PREFIX)%.o): Ditto.
            (m2/ppg$(exeext)): Ditto.
            (m2/gm2-ppg-boot/main.o): Ditto.
            (m2/gm2-auto): Ditto.
            (c-family/m2pp.o): Ditto.
            (BUILD-BOOT-PG-H): Correct macro definition.
            (m2/gm2-pg-boot/$(SRC_PREFIX)%.h): New rule.
            (m2/gm2-pg-boot/$(SRC_PREFIX)NameKey.h): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)NameKey.o): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)Lists.h): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)Lists.o): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)Output.h): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)Output.o): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)bnflex.h): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)bnflex.o): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)RTco.h): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)RTentity.h): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)RTco.o): Ditto.
            (m2/gm2-pg-boot/$(SRC_PREFIX)RTentity.o): Ditto.
            (BUILD-BOOT-PGE-H): Correct macro definition.
            (m2/gm2-pge-boot/$(SRC_PREFIX)SymbolKey.h): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)SymbolKey.o): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)NameKey.h): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)NameKey.o): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)Lists.h): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)Lists.o): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)Output.h): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)Output.o): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)bnflex.h): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)bnflex.o): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)RTco.h): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)RTentity.h): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)RTco.o): Ditto.
            (m2/gm2-pge-boot/$(SRC_PREFIX)RTentity.o): Ditto.
            (mc-basetest): Ditto.
            (mc-devel-basetest): Ditto.
            * gm2-compiler/M2Options.def (SetM2Dump): Add BOOLEAN return.
            * gm2-compiler/M2Quads.def (BuildAlignment): Add tokno parameter.
            (BuildBitLength): Ditto.
            * gm2-compiler/P3Build.bnf (ByteAlignment): Move tokpos assignment
            to the start of the block.
            * gm2-compiler/PCBuild.bnf (ConstSetOrQualidentOrFunction): Ditto.
            (SetOrDesignatorOrFunction): Ditto.
            * gm2-compiler/PHBuild.bnf (ConstSetOrQualidentOrFunction): Ditto.
            (SetOrDesignatorOrFunction): Ditto.
            (ByteAlignment): Ditto.
            * gm2-libs/dtoa.def (dtoa): Change mode to INTEGER.
            * gm2-libs/ldtoa.def (ldtoa): Ditto.
            * mc-boot-ch/GSYSTEM.c (_M2_SYSTEM_init): Correct parameter list.
            (_M2_SYSTEM_fini): Ditto.
            * mc-boot-ch/Gdtoa.cc (dtoa_calcsign): Return bool.
            (dtoa_dtoa): Return void * and use bool in the fifth parameter.
            (_M2_dtoa_init): Correct parameter list.
            (_M2_dtoa_fini): Ditto.
            * mc-boot-ch/Gerrno.cc (_M2_errno_init): Ditto.
            (_M2_errno_fini): Ditto.
            * mc-boot-ch/Gldtoa.cc (dtoa_calcsign): Return bool.
            (ldtoa_ldtoa): Return void * and use bool in the fifth parameter.
            (_M2_ldtoa_init): Correct parameter list.
            (_M2_ldtoa_fini): Ditto.
            * mc-boot-ch/Glibc.c (tracedb_zresult): New function.
            (libc_read): Return size_t and use size_t in parameter three.
            (libc_write): Return size_t and use size_t in parameter three.
            (libc_printf): Add const to the format specifier.
            Change declaration of c to use const.
            (libc_snprintf): Add const to the format specifier.
            Change declaration of c to use const.
            (libc_malloc): Use size_t.
            (libc_memcpy): Ditto.
            * mc-boot/GASCII.cc: Regenerate.
            * mc-boot/GArgs.cc: Ditto.
            * mc-boot/GAssertion.cc: Ditto.
            * mc-boot/GBreak.cc: Ditto.
            * mc-boot/GCmdArgs.cc: Ditto.
            * mc-boot/GDebug.cc: Ditto.
            * mc-boot/GDynamicStrings.cc: Ditto.
            * mc-boot/GEnvironment.cc: Ditto.
            * mc-boot/GFIO.cc: Ditto.
            * mc-boot/GFormatStrings.cc: Ditto.
            * mc-boot/GFpuIO.cc: Ditto.
            * mc-boot/GIO.cc: Ditto.
            * mc-boot/GIndexing.cc: Ditto.
            * mc-boot/GM2Dependent.cc: Ditto.
            * mc-boot/GM2EXCEPTION.cc: Ditto.
            * mc-boot/GM2RTS.cc: Ditto.
            * mc-boot/GMemUtils.cc: Ditto.
            * mc-boot/GNumberIO.cc: Ditto.
            * mc-boot/GPushBackInput.cc: Ditto.
            * mc-boot/GRTExceptions.cc: Ditto.
            * mc-boot/GRTint.cc: Ditto.
            * mc-boot/GSArgs.cc: Ditto.
            * mc-boot/GSFIO.cc: Ditto.
            * mc-boot/GStdIO.cc: Ditto.
            * mc-boot/GStorage.cc: Ditto.
            * mc-boot/GStrCase.cc: Ditto.
            * mc-boot/GStrIO.cc: Ditto.
            * mc-boot/GStrLib.cc: Ditto.
            * mc-boot/GStringConvert.cc: Ditto.
            * mc-boot/GSysStorage.cc: Ditto.
            * mc-boot/GTimeString.cc: Ditto.
            * mc-boot/Galists.cc: Ditto.
            * mc-boot/Gdecl.cc: Ditto.
            * mc-boot/Gkeyc.cc: Ditto.
            * mc-boot/Glists.cc: Ditto.
            * mc-boot/GmcComment.cc: Ditto.
            * mc-boot/GmcComp.cc: Ditto.
            * mc-boot/GmcDebug.cc: Ditto.
            * mc-boot/GmcError.cc: Ditto.
            * mc-boot/GmcFileName.cc: Ditto.
            * mc-boot/GmcLexBuf.cc: Ditto.
            * mc-boot/GmcMetaError.cc: Ditto.
            * mc-boot/GmcOptions.cc: Ditto.
            * mc-boot/GmcPreprocess.cc: Ditto.
            * mc-boot/GmcPretty.cc: Ditto.
            * mc-boot/GmcPrintf.cc: Ditto.
            * mc-boot/GmcQuiet.cc: Ditto.
            * mc-boot/GmcReserved.cc: Ditto.
            * mc-boot/GmcSearch.cc: Ditto.
            * mc-boot/GmcStack.cc: Ditto.
            * mc-boot/GmcStream.cc: Ditto.
            * mc-boot/Gmcp1.cc: Ditto.
            * mc-boot/Gmcp2.cc: Ditto.
            * mc-boot/Gmcp3.cc: Ditto.
            * mc-boot/Gmcp4.cc: Ditto.
            * mc-boot/Gmcp5.cc: Ditto.
            * mc-boot/GnameKey.cc: Ditto.
            * mc-boot/GsymbolKey.cc: Ditto.
            * mc-boot/Gvarargs.cc: Ditto.
            * mc-boot/Gwlists.cc: Ditto.
            * mc-boot/Gdecl.h: Ditto.
            * mc-boot/Gldtoa.h: Ditto.
            * mc-boot/Glibc.h: Ditto.
            * mc/decl.def (putTypeOpaque): New procedure.
            (isTypeOpaque): New procedure function.
            * mc/decl.mod (debugOpaque): New constant.
            (nodeT): New enumeration field opaquecast.
            (node): New record field opaquecastF.
            (opaqueCastState): New record.
            (opaquecastT): New record.
            (typeT): New field isOpaque.
            (varT): New field opaqueState.
            (arrayT): Ditto.
            (varparamT): Ditto.
            (paramT): Ditto.
            (pointerT): Ditto.
            (recordfieldT): Ditto.
            (componentrefT): Ditto.
            (pointerrefT): Ditto.
            (arrayrefT): Ditto.
            (procedureT): Ditto.
            (proctypeT): Ditto.
            (makeType): Initialize field isOpaque.
            (makeTypeImp): Initialize field isOpaque.
            (putVar): Call initNodeOpaqueCastState.
            (putReturnType): Ditto.
            (makeProcType): Ditto.
            (putProcTypeReturn): Ditto.
            (makeVarParameter): Ditto.
            (makeNonVarParameter): Ditto.
            (makeFuncCall): Ditto.
            (putTypeOpaque): New procedure.
            (isTypeOpaque): New procedure function.
            (doMakeComponentRef): Call initNodeOpaqueCastState.
            (makePointerRef): Call initNodeOpaqueCastState.
            (doGetFuncType): Call initNodeOpaqueCastState.
            (doBinary): Add FALSE parameter to doExprCup.
            (doDeRefC): Rewrite.
            (doComponentRefC): Call flushOpaque.
            (doPointerRefC): Call flushOpaque.
            (doArrayRefC): Add const_cast for unbounded array.
            (doExprCup): Rewrite.
            (doTypeAliasC): Remove.
            (isDeclType): New procedure function.
            (doEnumerationC): New procedure function.
            (doParamTypeEmit): Ditto.
            (doParamTypeNameModifier): Ditto.
            (initOpaqueCastState): Ditto.
            (initNodeOpaqueCastState): Ditto.
            (setOpaqueCastState): Ditto.
            (setNodeOpaqueVoidStar): Ditto.
            (nodeUsesOpaque): Ditto.
            (getNodeOpaqueVoidStar): Ditto.
            (getOpaqueFlushNecessary): Ditto.
            (makeOpaqueCast): Ditto.
            (flushOpaque): Ditto.
            (castOpaque): Ditto.
            (isTypeOpaqueDefImp): Ditto.
            (isParamVoidStar): Ditto.
            (isRefVoidStar): Ditto.
            (isReturnVoidStar): Ditto.
            (isVarVoidStar): Ditto.
            (initNodeOpaqueState): Ditto.
            (assignNodeOpaqueCastState): Ditto.
            (assignNodeOpaqueCastFalse): Ditto.
            (dumpOpaqueState): Ditto.
            (doProcTypeC): Rewrite.
            (isDeclInImp): New procedure function.
            (doTypeNameModifier): Ditto.
            (doTypeC): Emit typedef if enum is declared in this module.
            (doCompletePartialProcType): Rewrite.
            (outputCompletePartialProcType): New procedure.
            (doOpaqueModifier): Ditto.
            (doVarC): Ditto.
            (doProcedureHeadingC): Add opaque modifier to return type if
            necessary.
            (doReturnC): Cast opaque type for return if necessary.
            (forceCastOpaque): New procedure.
            (forceReintCastOpaque): New procedure.
            (doUnConstCastUnbounded): New procedure.
            (doAssignmentC): Cast opaque for both des and expr if necessary.
            (doAdrExprC): Use static_cast for void * casting.
            (doFuncVarParam): New procedure.
            (doFuncParamC): Rewrite.
            (doAdrArgC): Rewrite.
            (getFunction): New procedure function.
            (stop): Rename to ...
            (localstop): ... this.
            (dupFunccall): Call assignNodeOpaqueCastState.
            (dbg): Rewrite.
            (addDone): Rewrite.
            (addDoneDef): Do not add opaque types to the doneQ when declared in
            the definition module.
            * mc/mc.flex (openSource): Return bool.
            (_M2_mcflex_init): Correct parameter list.
            (_M2_mcflex_fini): Ditto.
            * mc/mcComment.h (stdbool.h): Include.
            (mcComment_initComment): Change unsigned int to bool.
            * mc/mcOptions.mod (handleOption): Disable --extended-opaque
            and issue warning.
            * mc/mcp1.bnf (DefTypeDeclaration): Call putTypeOpaque.

    gcc/testsuite/ChangeLog:

            PR modula2/114529
            * gm2/base-lang/pass/SYSTEM.def: New test.
            * gm2/base-lang/pass/base-lang-test.sh: New test.
            * gm2/base-lang/pass/globalproctype.def: New test.
            * gm2/base-lang/pass/globalproctype.mod: New test.
            * gm2/base-lang/pass/globalvar.def: New test.
            * gm2/base-lang/pass/globalvar.mod: New test.
            * gm2/base-lang/pass/globalvarassign.def: New test.
            * gm2/base-lang/pass/globalvarassign.mod: New test.
            * gm2/base-lang/pass/localproctype.def: New test.
            * gm2/base-lang/pass/localproctype.mod: New test.
            * gm2/base-lang/pass/localvar.def: New test.
            * gm2/base-lang/pass/localvar.mod: New test.
            * gm2/base-lang/pass/localvarassign.def: New test.
            * gm2/base-lang/pass/localvarassign.mod: New test.
            * gm2/base-lang/pass/opaquefield.def: New test.
            * gm2/base-lang/pass/opaquefield.mod: New test.
            * gm2/base-lang/pass/opaquenew.def: New test.
            * gm2/base-lang/pass/opaquenew.mod: New test.
            * gm2/base-lang/pass/opaqueparam.def: New test.
            * gm2/base-lang/pass/opaqueparam.mod: New test.
            * gm2/base-lang/pass/opaquestr.def: New test.
            * gm2/base-lang/pass/opaqueuse.def: New test.
            * gm2/base-lang/pass/opaqueuse.mod: New test.
            * gm2/base-lang/pass/opaqueusestr.def: New test.
            * gm2/base-lang/pass/opaqueusestr.mod: New test.
            * gm2/base-lang/pass/opaquevariant.def: New test.
            * gm2/base-lang/pass/opaquevariant.mod: New test.
            * gm2/base-lang/pass/opaquevarparam.def: New test.
            * gm2/base-lang/pass/opaquevarparam.mod: New test.
            * gm2/base-lang/pass/simplelist.def: New test.
            * gm2/base-lang/pass/simplelist.mod: New test.
            * gm2/base-lang/pass/simplelistiter.def: New test.
            * gm2/base-lang/pass/simplelistiter.mod: New test.
            * gm2/base-lang/pass/simpleopaque.def: New test.
            * gm2/base-lang/pass/simpleopaque.mod: New test.
            * gm2/base-lang/pass/straddress.def: New test.
            * gm2/base-lang/pass/straddress.mod: New test.
            * gm2/base-lang/pass/straddressexport.def: New test.
            * gm2/base-lang/pass/straddressexport.mod: New test.
            * gm2/base-lang/pass/unboundedarray.def: New test.
            * gm2/base-lang/pass/unboundedarray.mod: New test.

    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

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

* [Bug modula2/114529] profiledbootstrap fails to build and m2 causes odr violations during build
  2024-03-29  9:32 [Bug modula2/114529] New: profiledbootstrap fails to build and m2 causes odr violations during build gaius at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-06-11  9:02 ` cvs-commit at gcc dot gnu.org
@ 2024-06-11  9:08 ` gaius at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-06-11  9:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Patch applied to 15.0, after a week or two it will be applied to 14.0 and then
the PR can be closed.

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

end of thread, other threads:[~2024-06-11  9:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29  9:32 [Bug modula2/114529] New: profiledbootstrap fails to build and m2 causes odr violations during build gaius at gcc dot gnu.org
2024-03-29  9:32 ` [Bug modula2/114529] " gaius at gcc dot gnu.org
2024-04-02  8:58 ` arsen at gcc dot gnu.org
2024-05-21 13:57 ` gaius at gcc dot gnu.org
2024-05-29 14:05 ` gaius at gcc dot gnu.org
2024-06-06 13:24 ` gaius at gcc dot gnu.org
2024-06-08 19:57 ` gaius at gcc dot gnu.org
2024-06-11  9:02 ` cvs-commit at gcc dot gnu.org
2024-06-11  9:08 ` gaius 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).