Commit Graph

225382 Commits

Author SHA1 Message Date
Jose E. Marchesi
1150e6de75 a68: low: modes
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-low-moids.cc: New file.
2025-11-30 01:52:19 +01:00
Jose E. Marchesi
85811069bf a68: low: units and coercions
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-low-coercions.cc: New file.
	* algol68/a68-low-generator.cc: Likewise.
	* algol68/a68-low-units.cc: Likewise.
2025-11-30 01:52:19 +01:00
Jose E. Marchesi
dc2759b1a9 a68: low: ranges
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-low-ranges.cc: New file.
2025-11-30 01:52:18 +01:00
Jose E. Marchesi
a520f14594 a68: low: builtins
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-low-builtins.cc: New file.
2025-11-30 01:52:18 +01:00
Jose E. Marchesi
28b80fb762 a68: low: runtime
Libcalls for operations implemented in the run-time environment.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-low-runtime.cc: New file.
	* algol68/a68-low-runtime.def: Likewise.
2025-11-30 01:52:17 +01:00
Jose E. Marchesi
f3051813b8 a68: low: clauses and declarations
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-low-clauses.cc: New file.
	* algol68/a68-low-decls.cc: Likewise.
2025-11-30 01:52:16 +01:00
Jose E. Marchesi
d27b9ed9c7 a68: low: standard prelude
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-low-posix.cc: New file.
	* algol68/a68-low-prelude.cc: Likewise.
2025-11-30 01:52:16 +01:00
Jose E. Marchesi
0defb7f15e a68: low: stowed values
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-low-multiples.cc: New file.
	* algol68/a68-low-structs.cc: Likewise.
	* algol68/a68-low-unions.cc: Likewise.
2025-11-30 01:52:16 +01:00
Jose E. Marchesi
466a286c33 a68: low: plain values
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-low-bits.cc: New file.
	* algol68/a68-low-bools.cc: Likewise.
	* algol68/a68-low-chars.cc: Likewise.
	* algol68/a68-low-complex.cc: Likewise.
	* algol68/a68-low-ints.cc: Likewise.
	* algol68/a68-low-procs.cc: Likewise.
	* algol68/a68-low-reals.cc: Likewise.
	* algol68/a68-low-refs.cc: Likewise.
	* algol68/a68-low-strings.cc: Likewise.
2025-11-30 01:52:15 +01:00
Jose E. Marchesi
bb9c6fecc4 a68: low: lowering entry point and misc handlers
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-low.cc: New file.
	* algol68/a68-low-misc.cc: Likewise.
2025-11-30 01:52:14 +01:00
Jose E. Marchesi
1730426b8a a68: parser: pragmats infrastructure
This patch adds the infrastructure for adding handlers for pragmats,
along with some intial support for the "access Module" pragmat.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-parser-pragmat.cc: New file.
2025-11-30 01:52:14 +01:00
Jose E. Marchesi
803189d932 a68: parser: dynamic stack usage in serial clauses
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-parser-serial-dsa.cc: New file.
2025-11-30 01:52:13 +01:00
Jose E. Marchesi
ef7c6104e5 a68: parser: extraction of tags from phrases
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:12 +01:00
Jose E. Marchesi
b95636bf3e a68: parser: debug facilities
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-parser-debug.cc: New file.
2025-11-30 01:52:12 +01:00
Jose E. Marchesi
9b33d117f8 a68: parser: static scope checker
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:12 +01:00
Jose E. Marchesi
95b025f3a1 a68: parser: symbol table management
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:11 +01:00
Jose E. Marchesi
942dff65c0 a68: parser: parsing of modes
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:11 +01:00
Jose E. Marchesi
9c7a056adb a68: parser: standard prelude definitions
Definitions of standard identifiers, procedures and modes.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:10 +01:00
Jose E. Marchesi
6fe1583fbf a68: parser: syntax check for declarers
Thi pass checks the syntax of formal, actual and virtual declarers.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:10 +01:00
Jose E. Marchesi
4928aa83e1 a68: parser: bottom-up parser
Bottom-up parser for the Algol 68 front-end.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:10 +01:00
Jose E. Marchesi
96820d1c46 a68: parser: parenthesis checker
This pass makes sure all brackets (parenthesis) are matched in the
source program.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:09 +01:00
Jose E. Marchesi
0c5facd729 a68: parser: top-down parser
Top-down parser for the Algol 68 front-end.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:09 +01:00
Jose E. Marchesi
ef6b8bebb7 a68: parser: keyword tables management
This commit adds code to manage the table of keywords (bold words) in
the Algol 68 front-end.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:08 +01:00
Jose E. Marchesi
c08d036dd9 a68: parser: scanner
Lexer for the Algol 68 front-end.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:08 +01:00
Jose E. Marchesi
539d0c1300 a68: parser: AST nodes attributes/types
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-parser-attrs.def: New file.
2025-11-30 01:52:07 +01:00
Jose E. Marchesi
bffb702400 a68: parser: entry point
This commit adds the parsing support code and the entry point to the
parser.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>
2025-11-30 01:52:06 +01:00
Jose E. Marchesi
4e61dc5749 a68: modules imports
This patch adds support for importing module interfaces, read from
object files, shared objects, archives or stand-alone files.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-imports.cc: New file.
2025-11-30 01:52:06 +01:00
Jose E. Marchesi
51b5a394d9 a68: modules exports
This commit adds the code that handles the exports information for the
module definitions in prelude packets.  The exports info is generated
in a section in the output object file.

A precise description of the binary format in which the exports are
encoded is expressed in an included GNU poke pickle ga68-exports.pk.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-exports.cc: New file.
	* algol68/ga68-exports.pk: Likewise.
2025-11-30 01:52:06 +01:00
Jose E. Marchesi
54d11abf26 a68: front-end diagnostics
This commit adds the diagnostics infrastructure for the Algol 68
front-end.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
Co-authored-by: Marcel van der Veer <algol68g@xs4all.nl>

gcc/ChangeLog

	* algol68/a68-diagnostics.cc: New file.
2025-11-30 01:52:05 +01:00
Jose E. Marchesi
c92ad59aa2 a68: unicode support routines
This commit adds several utility functions to deal with Unicode
strings.

These functions have been adapted from the libunistring gnulib module.

gcc/ChangeLog

	* algol68/a68-unistr.c: New file.
2025-11-30 01:52:05 +01:00
Jose E. Marchesi
58c3f0fb3d a68: a681 compiler proper
This commit adds the language hooks and the target hooks for the Algol
68 front-end, which implement the a681 compiler proper.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/a68-lang.cc: New file.
2025-11-30 01:52:05 +01:00
Jose E. Marchesi
df160b3add a68: ga68 compiler driver
This commit adds the main sources for the ga68 compiler driver.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog:

	* algol68/a68spec.cc: New file.
	* algol68/lang-specs.h: Likewise.
2025-11-30 01:52:04 +01:00
Jose E. Marchesi
9ed1b0e964 a68: gcc/algol68 misc files
README contains a description of the front-end, and brief instructions
for developers.

At the moment the front-end doesn't define any custom tree node, as of
yet.  gcc/algol68/a68-tree.def is a placeholder where to have these
node codes.

a68-types.h and a68.h are the main header files used by the front-end.
Together they provide data definitions and prototypes of functions
defined in the .cc files.

ga68.vw contains a revised-report like formal description of the
language implemented by this compiler.  This includes GNU extensions.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/ChangeLog

	* algol68/README: New file.
	* algol68/a68-tree.def: Likewise.
	* algol68/a68-types.h: Likewise.
	* algol68/a68.h: Likewise.
	* algol68/ga68.vw: Likewise.
2025-11-30 01:52:04 +01:00
GCC Administrator
5d70604b74 Daily bump. 2025-11-30 00:16:27 +00:00
Nathaniel Shead
858f300727 c++: Support template block-scope OpenMP user-defined reductions in modules [PR119864]
There were two issues preventing OpenMP reductions of UDTs from working
in modules.

Firstly, we were failing a number of checking asserts in the streaming
logic because the declaration is a DECL_LOCAL_DECL_P but was not
correctly added to the BLOCK of the function template.  This is because
cp_parser_omp_declare_reduction only called pushdecl when
!processing_template_decl; correcting this fixed this issue.

The second issue is that modules saw this as a function definition and
so attempted to call allocate_struct_function on it, which crashes.
Given that these reduction functions don't really behave like real
function definitions in any other way, I think the cleanest solution is
to just skip all the function definition post-processing in modules;
this seems to work to get the test functioning correctly, from what I
can see.

	PR c++/119864

gcc/cp/ChangeLog:

	* module.cc (trees_in::read_function_def): Don't call
	post_process on OpenMP UDT reductions.
	* parser.cc (cp_parser_omp_declare_reduction): Call push_decl
	for block_scope, even when processing_template_decl.

gcc/testsuite/ChangeLog:

	* g++.dg/modules/omp-4_a.C: New test.
	* g++.dg/modules/omp-4_b.C: New test.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jakub Jelinek <jakub@redhat.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
2025-11-30 11:01:09 +11:00
Eczbek
ef4cd115ef c++: Allow lambda expressions in template type parameters [PR116952]
PR c++/116952

gcc/cp/ChangeLog:

	* parser.cc (cp_parser_lambda_expression): Revert
	r11-8166-ge1666ebd9ad31d change prohibiting lambda in non-type
	parameter.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/lambda-uneval14.C: Revise incorrect test.
	* g++.dg/cpp2a/lambda-uneval29.C: New test.

Co-authored-by: Jason Merrill <jason@redhat.com>
2025-11-29 23:06:05 +05:30
Jakub Jelinek
54480d16b6 c++: Limit P2795R5 handling of jumps across vacuous inits to !processing_template_decl [PR122758]
The extra handling of jumps across vacuous inits for -std=c++26
or -ftrivial-auto-var-init={zero,pattern} added for P2795R5 is undesirable
when processing_template_decl, because it creates labels without DECL_NAME
and GOTO_EXPRs to those and those can't be tsubsted.
I was afraid the pop_labels and check_goto_1 and check_previous_goto_1
handling might not happen again during instantiation, but clearly it does
happen fully (and has to, because whether some declaration has vacuous
initialization or not can't be decided in some cases when parsing the
template, if dependent types are involved).

So, this patch just restricts the P2795R5 PR114457 r16-4212 changes
to !processing_template_decl and adds 2 copies of the erroneous2.C testcase,
one changing the function into a function template where nothing is
dependent and another one where most of the declarations are dependent.

2025-11-29  Jakub Jelinek  <jakub@redhat.com>

	PR c++/122758
	* decl.cc (pop_labels): Don't call adjust_backward_gotos if
	processing_template_decl.
	(decl_instrument_init_bypass_p): Always return false if
	processing_template_decl.
	(check_goto_1): Don't push anything to direct_goto vector
	if processing_template_decl.

	* g++.dg/cpp26/erroneous5.C: New test.
	* g++.dg/cpp26/erroneous6.C: New test.
2025-11-29 17:37:58 +01:00
Richard Biener
55049da531 Bump libgo SONAME
The following bumps the libgo SONAME to prevent PR119098 from re-appearing
for GCC 15/16.

For PR go/122802
2025-11-29 12:28:38 +01:00
Richard Biener
bd098c34be Bump libgcobol SONAME
This bumps the libgcobol SONAME for GCC 16 since compared to GCC 15
there are removed symbols and key data structures have changed.

	PR cobol/122803
libgcobol/
	* configure.ac (LIBGCOBOL_VERSION): Bump to 2:0:0.
	* configure: Re-generate.
2025-11-29 12:28:21 +01:00
Sandra Loosemore
82d852b23e doc: make regenerate-opt-urls
gcc/ChangeLog
	* common.opt.urls: Regenerated.
	* config/aarch64/aarch64.opt.urls: Regenerated.
	* config/alpha/alpha.opt.urls: Regenerated.
	* config/arm/arm.opt.urls: Regenerated.
	* config/avr/avr.opt.urls: Regenerated.
	* config/bpf/bpf.opt.urls: Regenerated.
	* config/c6x/c6x.opt.urls: Regenerated.
	* config/cris/cris.opt.urls: Regenerated.
	* config/cris/elf.opt.urls: Regenerated.
	* config/csky/csky.opt.urls: Regenerated.
	* config/darwin.opt.urls: Regenerated.
	* config/epiphany/epiphany.opt.urls: Regenerated.
	* config/frv/frv.opt.urls: Regenerated.
	* config/ft32/ft32.opt.urls: Regenerated.
	* config/gcn/gcn.opt.urls: Regenerated.
	* config/i386/i386.opt.urls: Regenerated.
	* config/ia64/ia64.opt.urls: Regenerated.
	* config/loongarch/loongarch.opt.urls: Regenerated.
	* config/m68k/m68k.opt.urls: Regenerated.
	* config/microblaze/microblaze.opt.urls: Regenerated.
	* config/mips/mips.opt.urls: Regenerated.
	* config/mmix/mmix.opt.urls: Regenerated.
	* config/or1k/or1k.opt.urls: Regenerated.
	* config/pa/pa.opt.urls: Regenerated.
	* config/pdp11/pdp11.opt.urls: Regenerated.
	* config/rs6000/rs6000.opt.urls: Regenerated.
	* config/s390/s390.opt.urls: Regenerated.
	* config/sparc/sparc.opt.urls: Regenerated.
	* config/v850/v850.opt.urls: Regenerated.
	* config/vax/vax.opt.urls: Regenerated.
	* config/visium/visium.opt.urls: Regenerated.
2025-11-29 03:27:11 +00:00
Sandra Loosemore
64b61f9f50 doc: Fix alphabetization of FRV/FT32 option documentation sections.
The FRV and FT32 options were incorrectly alphabetized with respect to
each other in the Options Summary, the menu for the Submodel Options
section, and in the order of their respective subsections.  Fixed
thusly.

gcc/ChangeLog
	* doc/invoke.texi (Options Summary): Switch ordering of FRV
	and FT32.
	(Submodel Options): Likewise in the menu and section ordering.
2025-11-29 03:27:11 +00:00
Sandra Loosemore
1290b35c7e doc, linux: Clean up GNU/Linux option documentation [PR122243]
gcc/ChangeLog
	PR other/122243
	* doc/invoke.texi: Document -mno-android.
2025-11-29 03:27:11 +00:00
Sandra Loosemore
8a57aabf33 doc, frv: Clean up FRV option documentation [PR122243]
frv.opt has a few options that have never been documented in the
manual.  In the initial commit of the FRV port (prior to the adoption
of .opt files) they were marked as "Internal debug switch" so I have
explicitly made them "Undocumented", consistently with other options
similarly marked in the original port.

The documentation changes all straightforward here, to bring this
section into conformance with conventions being applied through this
chapter of the manual.

gcc/ChangeLog
	PR other/122243
	* config/frv/frv.opt (mbranch-cost=): Mark as Undocumented.
	(mcond-exec-insns=): Likewise.
	(mcond-exec-tempss=): Likewise.
	* doc/invoke.texi (Option Summary) <FRV Options>: Remove duplicate
	positive/negative forms from the list.
	(FRV Options): Combine documentation of positive/negative forms
	where they were listed separately.  Add @opindex entries for
	negative forms.
2025-11-29 03:27:11 +00:00
Sandra Loosemore
7ba5e0e450 doc, ft32: Clean up FT32 options and documentation [PR122243]
gcc/ChangeLog
	PR other/122243
	* config/ft32/ft32.opt (mlra): Mark obsolete option as Undocumented.
	* doc/invoke.texi (Option Summary) <FT32 Options>: Remove -mlra.
	(FT32 Options): Likewise.  Add @opindex entries for negative
	option forms.
2025-11-29 03:27:10 +00:00
Sandra Loosemore
6477814cb7 doc, fr30: Clean up FR30 option documentation [PR122243]
gcc/ChangeLog
	PR other/122243
	* doc/invoke.texi (FR30 Options): Add @opindex for -mno-small-model.
2025-11-29 03:27:10 +00:00
Sandra Loosemore
bd360e9f24 doc, bpf: Clean up eBPF option documentation [PR122243]
gcc/ChangeLog
	PR other/122243
	* doc/invoke.texi (Option Summary) <eBPF Options>: Fix formatting
	issues.  Remove redundant entry for -mno-co-re.
	(eBPF Options): Add missing @opindex entries.  Combine documentation
	for -mco-re and -mno-co-re.
2025-11-29 03:27:10 +00:00
Sandra Loosemore
32bc699760 doc, alpha: Document missing alpha options [PR122243]
gcc/ChangeLog
	PR other/122243
	* config/alpha/alpha.opt (mgas): Mark as Undocumented.
	* doc/invoke.texi (Option Summary) <DEC Alpha Options>:  Add
	-mtls-kernel, -mtls-size=, -mlong-double-128, and -mlong-double-64.
	(DEC Alpha Options): Likewise.
2025-11-29 03:27:10 +00:00
Sandra Loosemore
3b66b18fe8 doc, darwin: Clean up Darwin options and documentation [PR122243]
The Darwin target options documentation was a bit of a mess, with several
undocumented options, some that were listed in the option summary or mentioned
in discussion of other options but not actually documented, and a large
number of options listed in darwin.opt as being obsolete.

I've undocumented all the obsolete options to streamline things, plus a few
others that seem to have been intentially undocumented or supplanted by
other options.  For the others that were probably supposed to documented,
I did my best to guess what they're for by reading the code or just
copying the documentation string in the .opt file, but it's certainly
possible I screwed some up.

gcc/ChangeLog
	PR other/122243
	* config/darwin.opt (findirect-virtual-calls): Mark as Undocumented.
	(fterminated-vtables): Likewise.
	(multi_module): Likewise.
	(multiply_defined): Likewise.
	(multiply_defined_unused): Likewise.
	(no_dead_strip_inits_and_terms): Likewise.
	(noprefixbinding): Likewise.
	(nomultidefs): Likewise.
	(noprebind): Likewise.
	(noseglinkedit): Likewise.
	(ObjC, ObjC++): Add documentation strings.
	(object): Mark as Undocumented.
	(prebind): Likewise.
	(prebind_all_twolevel_modules): Likewise.
	(private_bundle): Likewise.
	(sectobjectsymbols): Likewise.
	(sectorder): Likewise.
	(seg_addr_table_filename): Likewise.
	(segcreate): Likewise.
	(seglinkedit): Likewise.
	(single_module): Likewise.
	(X): Likewise.
	(y): Likewise.
	(Mach): Likewise.
	* doc/invoke.texi (Option Summary) <Darwin Options>: Improve
	alphabetization of the list.  Remove obsolete/undocumented
	options and add missing entries.
	(Darwin Options): Add documentation for -arch, -dependency-file,
	-fapple-kext, -matt-stubs, -fconstant-cfstrings, -mdynamic-no-pic,
	-asm_macosx_version_min, -msymbol-stubs, -mtarget-linker,
	-ObjC, -ObjC++, -Wnonportable-cfstrings.  Update the list
	of options passed to the linker to remove obsolete options
	and add missing ones; also move the block of @opindex entries
	before the list items instead of putting it in the middle.
2025-11-29 03:27:10 +00:00
Sandra Loosemore
393b5b4b18 doc, mingw: Clean up Cygwin and MinGW option documentation [PR122243]
gcc/ChangeLog
	PR other/122243
	* doc/invoke.texi (Option Summary) <Cygwin and MinGW Options>:
	Correct spelling of -mthreads and add missing options.
	(Cygwin and MinGW Options): Add @opindex for negative forms.
2025-11-29 03:27:09 +00:00
Sandra Loosemore
c49c290a33 doc, csky: C-SKY option documentation cleanup [PR122243]
gcc/ChangeLog
	PR other/122243
	* doc/invoke.texi (Option Summary) <C-SKY Options>: Remove
	entries for "Undocumented" options -EB, -EL, -mhard-float,
	-msoft-float, and nonexistent option -mcse-cc.
	(C-SKY Options): Likewise.  Also remove references to "Undocumented"
	option -mstm and uniformly index/document the -mno- forms for
	consistency with other options in this section that already do so.
2025-11-29 03:27:09 +00:00