Commit Graph

789 Commits

Author SHA1 Message Date
Jakub Jelinek
254a858ae7 Update copyright years. 2026-01-02 09:56:11 +01:00
GCC Administrator
672b580d85 Daily bump. 2026-01-02 00:16:23 +00:00
Jakub Jelinek
24fbc14eeb Rotate ChangeLog files.
Rotate ChangeLog files for ChangeLogs with yearly cadence.
Also remove empty lines before Form Feed line.
2026-01-01 18:50:16 +01:00
Jakub Jelinek
2af2da18cb Update copyright dates.
Manual part of copyright year updates.

2026-01-01  Jakub Jelinek  <jakub@redhat.com>

gcc/
	* gcc.cc (process_command): Update copyright notice dates.
	* gcov-dump.cc (print_version): Ditto.
	* gcov.cc (print_version): Ditto.
	* gcov-tool.cc (print_version): Ditto.
	* gengtype.cc (create_file): Ditto.
	* doc/cpp.texi: Bump @copying's copyright year.
	* doc/cppinternals.texi: Ditto.
	* doc/gcc.texi: Ditto.
	* doc/gccint.texi: Ditto.
	* doc/gcov.texi: Ditto.
	* doc/install.texi: Ditto.
	* doc/invoke.texi: Ditto.
gcc/ada/
	* gnat_ugn.texi: Bump @copying's copyright year.
	* gnat_rm.texi: Likewise.
gcc/d/
	* gdc.texi: Bump @copyrights-d year.
gcc/fortran/
	* gfortranspec.cc (lang_specific_driver): Update copyright notice
	dates.
	* gfc-internals.texi: Bump @copying's copyright year.
	* gfortran.texi: Ditto.
	* intrinsic.texi: Ditto.
	* invoke.texi: Ditto.
gcc/go/
	* gccgo.texi: Bump @copyrights-go year.
libgomp/
	* libgomp.texi: Bump @copying's copyright year.
libitm/
	* libitm.texi: Bump @copying's copyright year.
libquadmath/
	* libquadmath.texi: Bump @copying's copyright year.
2026-01-01 18:40:58 +01:00
GCC Administrator
3b30d09ac7 Daily bump. 2025-12-01 00:16:36 +00:00
Andrew Pinski
c6af130047 Regenerate .opt.urls
Looks like Jose forgot to one last regenerate of the opt.urls file.

Pushed as obvious after quickly looking to make sure they look decent.

gcc/ada/ChangeLog:

	* gcc-interface/lang.opt.urls: Regenerate.

gcc/ChangeLog:

	* algol68/lang.opt.urls: Regenerate.

gcc/c-family/ChangeLog:

	* c.opt.urls: Regenerate.

gcc/cobol/ChangeLog:

	* lang.opt.urls: Regenerate.

gcc/d/ChangeLog:

	* lang.opt.urls: Regenerate.

gcc/fortran/ChangeLog:

	* lang.opt.urls: Regenerate.

gcc/go/ChangeLog:

	* lang.opt.urls: Regenerate.

gcc/m2/ChangeLog:

	* lang.opt.urls: Regenerate.

gcc/rust/ChangeLog:

	* lang.opt.urls: Regenerate.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
2025-11-29 19:53:44 -08:00
GCC Administrator
3b58b78f1a Daily bump. 2025-08-19 00:20:02 +00:00
Indu Bhagat
0e09be99c0 opts: use sanitize_code_type for sanitizer flags
Currently, the data type of sanitizer flags is unsigned int, with
SANITIZE_SHADOW_CALL_STACK (1UL << 31) being highest individual
enumerator for enum sanitize_code.  Use 'sanitize_code_type' data type
to allow for more distinct instrumentation modes be added when needed.

gcc/ChangeLog:

	* flag-types.h (sanitize_code_type): Define.
	* asan.h (sanitize_flags_p): Use 'sanitize_code_type' instead of
	'unsigned int'.
	* common.opt: Likewise.
	* dwarf2asm.cc (dw2_output_indirect_constant_1): Likewise.
	* opts.cc (find_sanitizer_argument): Likewise.
	(report_conflicting_sanitizer_options): Likewise.
	(parse_sanitizer_options): Likewise.
	(parse_no_sanitize_attribute): Likewise.
	* opts.h (parse_sanitizer_options): Likewise.
	(parse_no_sanitize_attribute): Likewise.
	* tree-cfg.cc (print_no_sanitize_attr_value): Likewise.
	* tree.cc (tree_fits_sanitize_code_type_p): Define.
	(tree_to_sanitize_code_type): Likewise.
	* tree.h (tree_fits_sanitize_code_type_p): Declare.
	(tree_to_sanitize_code_type): Likewise.

gcc/c-family/ChangeLog:

	* c-attribs.cc (add_no_sanitize_value): Use 'sanitize_code_type'
	instead of 'unsigned int'.
	(handle_no_sanitize_attribute): Likewise.
	(handle_no_sanitize_address_attribute): Likewise.
	(handle_no_sanitize_thread_attribute): Likewise.
	(handle_no_address_safety_analysis_attribute): Likewise.
	* c-common.h (add_no_sanitize_value): Likewise.

gcc/c/ChangeLog:

	* c-parser.cc (c_parser_declaration_or_fndef): Use
	'sanitize_code_type' instead of 'unsigned int'.

gcc/cp/ChangeLog:

	* typeck.cc (get_member_function_from_ptrfunc): Use
	'sanitize_code_type' instead of 'unsigned int'.

gcc/d/ChangeLog:

	* d-attribs.cc (d_handle_no_sanitize_attribute): Use
	'sanitize_code_type' instead of 'unsigned int'.

Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
2025-08-18 18:09:07 +03:00
GCC Administrator
1afd70fa2e Daily bump. 2025-08-12 00:20:17 +00:00
Iain Sandoe
b0927c5c8c D: Adjust the code-gen for a string constant.
In this function, we are generating a string constant but do so with
a mismatch between the actual string length and the length specified
in the type.  This causes Darwin, at least, to place the string in an
unexpected section (since the parameters do not match, it is rejected
as a cstring).

Use build_string_literal() to construct a consistent null-terminated
string.

gcc/d/ChangeLog:

	* d-codegen.cc (build_filename_from_loc): Use
	build_string_literal() to build a null-terminated string for
	the filename.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2025-08-11 20:41:59 +01:00
GCC Administrator
ca2169c65b Daily bump. 2025-08-07 00:20:46 +00:00
Sam James
612194c064 gcc: drop placement new workaround for old bootstrap compilers
Since r15-4719-ga9ec1bc06bd3cc, we require GCC 5.4, so a workaround for
< GCC 4.3 is long-obsolete. Before that, we required GCC 4.8.3 too.

i.e. it shouldn't be possible to build GCC with such a compiler for
quite some time.

gcc/ChangeLog:
	PR libstdc++/29286
	* Makefile.in (ALIASING_FLAGS): Drop.
	* configure: Regenerate.
	* configure.ac: Drop -fno-strict-aliasing workaround for < GCC 4.3.

gcc/d/ChangeLog:

	* Make-lang.in (ALL_DFLAGS): Don't use ALIASING_FLAGS.
2025-08-06 17:46:06 +01:00
GCC Administrator
13516aff9a Daily bump. 2025-07-26 00:19:51 +00:00
David Malcolm
24ffe3ea64 diagnostics: eliminate ::diagnostic_info typedef
No functional change intended.

gcc/c-family/ChangeLog:
	* c-common.cc: Update usage of "diagnostic_info" to explicitly
	refer to "diagnostics::diagnostic_info".
	* c-opts.cc: Likewise.

gcc/c/ChangeLog:
	* c-errors.cc: Update usage of "diagnostic_info" to explicitly
	refer to "diagnostics::diagnostic_info".

gcc/cp/ChangeLog:
	* constexpr.cc: Update usage of "diagnostic_info" to explicitly
	refer to "diagnostics::diagnostic_info".
	* cp-tree.h: Likewise.
	* error.cc: Likewise.
	* module.cc: Likewise.

gcc/d/ChangeLog:
	* d-diagnostic.cc: Likewise.

gcc/ChangeLog:
	* diagnostic.h: Eliminate "diagnostic_info" typedef.
	* diagnostics/context.cc: Update usage of "diagnostic_info" to
	explicitly refer to "diagnostics::diagnostic_info".
	* langhooks.cc: Likewise.
	* libgdiagnostics.cc: Likewise.
	* rtl-error.cc: Likewise.
	* substring-locations.cc: Likewise.
	* toplev.cc: Likewise.
	* tree-diagnostic.cc: Likewise.
	* tree-diagnostic.h: Likewise.

gcc/fortran/ChangeLog:
	* cpp.cc: Update usage of "diagnostic_info" to explicitly refer to
	"diagnostics::diagnostic_info".
	* error.cc: Likewise.

gcc/jit/ChangeLog:
	* dummy-frontend.cc: Update usage of "diagnostic_info" to
	explicitly refer to "diagnostics::diagnostic_info".

gcc/m2/ChangeLog:
	* gm2-gcc/m2linemap.cc: Update usage of "diagnostic_info" to
	explicitly refer to "diagnostics::diagnostic_info".
	* gm2-gcc/rtegraph.cc: Likewise.

gcc/rust/ChangeLog:
	* resolve/rust-ice-finalizer.cc: Update usage of "diagnostic_info"
	to explicitly refer to "diagnostics::diagnostic_info".
	* resolve/rust-ice-finalizer.h: Likewise.

gcc/testsuite/ChangeLog:
	* g++.dg/plugin/show_template_tree_color_plugin.cc: Update usage
	of "diagnostic_info" to explicitly refer to
	"diagnostics::diagnostic_info".
	* gcc.dg/plugin/diagnostic_group_plugin.cc: Likewise.
	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.cc: Likewise.
	* gcc.dg/plugin/location_overflow_plugin.cc: Likewise.

libcc1/ChangeLog:
	* context.cc: Update usage of "diagnostic_info" to explicitly
	refer to "diagnostics::diagnostic_info".

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-07-25 15:13:45 -04:00
David Malcolm
3cc27ed5b6 diagnostics: convert diagnostic_t to enum class diagnostics::kind
No functional change intended.

gcc/ChangeLog:
	* Makefile.in: Replace diagnostic.def with diagnostics/kinds.def.
	* config/aarch64/aarch64.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.
	* config/i386/i386-options.cc: Likewise.
	* config/s390/s390.cc: Likewise.
	* diagnostic-core.h: Replace typedef diagnostic_t with
	enum class diagnostics::kind in diagnostics/kinds.h and include
	it.
	* diagnostic-global-context.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.
	* diagnostic.cc: Likewise.
	* diagnostic.h: Likewise.
	* diagnostics/buffering.cc: Likewise.
	* diagnostics/buffering.h: Likewise.
	* diagnostics/context.h: Likewise.
	* diagnostics/diagnostic-info.h: Likewise.
	* diagnostics/html-sink.cc: Likewise.
	* diagnostic.def: Move to...
	* diagnostics/kinds.def: ...here and update for diagnostic_t
	becoming enum class diagnostics::kind.
	* diagnostics/kinds.h: New file, based on material in
	diagnostic-core.h.
	* diagnostics/lazy-paths.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.
	* diagnostics/option-classifier.cc: Likewise.
	* diagnostics/option-classifier.h: Likewise.
	* diagnostics/output-spec.h: Likewise.
	* diagnostics/paths-output.cc: Likewise.
	* diagnostics/sarif-sink.cc: Likewise.
	* diagnostics/selftest-context.cc: Likewise.
	* diagnostics/selftest-context.h: Likewise.
	* diagnostics/sink.h: Likewise.
	* diagnostics/source-printing.cc: Likewise.
	* diagnostics/text-sink.cc: Likewise.
	* diagnostics/text-sink.h: Likewise.
	* gcc.cc: Likewise.
	* libgdiagnostics.cc: Likewise.
	* lto-wrapper.cc: Likewise.
	* opts-common.cc: Likewise.
	* opts-diagnostic.h: Likewise.
	* opts.cc: Likewise.
	* rtl-error.cc: Likewise.
	* substring-locations.cc: Likewise.
	* toplev.cc: Likewise.

gcc/ada/ChangeLog:
	* gcc-interface/trans.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.

gcc/analyzer/ChangeLog:
	* pending-diagnostic.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.
	* program-point.cc: Likewise.

gcc/c-family/ChangeLog:
	* c-common.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.
	* c-format.cc: Likewise.
	* c-lex.cc: Likewise.
	* c-opts.cc: Likewise.
	* c-pragma.cc: Likewise.
	* c-warn.cc: Likewise.

gcc/c/ChangeLog:
	* c-errors.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.
	* c-parser.cc: Likewise.
	* c-typeck.cc: Likewise.

gcc/cobol/ChangeLog:
	* util.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.

gcc/cp/ChangeLog:
	* call.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.
	* constexpr.cc: Likewise.
	* cp-tree.h: Likewise.
	* decl.cc: Likewise.
	* error.cc: Likewise.
	* init.cc: Likewise.
	* method.cc: Likewise.
	* module.cc: Likewise.
	* parser.cc: Likewise.
	* pt.cc: Likewise.
	* semantics.cc: Likewise.
	* typeck.cc: Likewise.
	* typeck2.cc: Likewise.

gcc/d/ChangeLog:
	* d-diagnostic.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.

gcc/fortran/ChangeLog:
	* cpp.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.
	* error.cc: Likewise.
	* options.cc: Likewise.

gcc/jit/ChangeLog:
	* dummy-frontend.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.

gcc/m2/ChangeLog:
	* gm2-gcc/m2linemap.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.
	* gm2-gcc/rtegraph.cc: Likewise.

gcc/rust/ChangeLog:
	* backend/rust-tree.cc: Update for diagnostic_t becoming
	enum class diagnostics::kind.
	* backend/rust-tree.h: Likewise.
	* resolve/rust-ast-resolve-expr.cc: Likewise.
	* resolve/rust-ice-finalizer.cc: Likewise.
	* resolve/rust-ice-finalizer.h: Likewise.
	* resolve/rust-late-name-resolver-2.0.cc: Likewise.

gcc/testsuite/ChangeLog:
	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.cc: Update for
	diagnostic_t becoming enum class diagnostics::kind.
	* gcc.dg/plugin/expensive_selftests_plugin.cc: Likewise.
	* gcc.dg/plugin/location_overflow_plugin.cc: Likewise.
	* lib/gcc-dg.exp: Likewise.

libcpp/ChangeLog:
	* internal.h: Update comment for diagnostic_t becoming
	enum class diagnostics::kind.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-07-25 15:13:43 -04:00
David Malcolm
f3157d0426 diagnostics: add m_ prefix to fields of diagnostic_info
No functional change intended.

gcc/c-family/ChangeLog:
	* c-opts.cc (c_diagnostic_text_finalizer): Add "m_" prefix to
	fields of diagnostic_info.

gcc/c/ChangeLog:
	* c-errors.cc: Update to add "m_" prefix to fields of
	diagnostic_info throughout.

gcc/cp/ChangeLog:
	* constexpr.cc: Update to add "m_" prefix to fields of
	diagnostic_info throughout.
	* error.cc: Likewise.

gcc/d/ChangeLog:
	* d-diagnostic.cc (d_diagnostic_report_diagnostic): Update to add
	"m_" prefix to fields of diagnostic_info throughout.

gcc/ChangeLog:
	* diagnostic.cc: Update to add "m_" prefix to fields of
	diagnostic_info throughout.
	* diagnostic.h: Likewise.
	* diagnostics/html-sink.cc: Likewise.
	* diagnostics/sarif-sink.cc: Likewise.
	* diagnostics/text-sink.cc: Likewise.
	* libgdiagnostics.cc: Likewise.
	* substring-locations.cc: Likewise.
	* tree-diagnostic.cc: Likewise.

gcc/fortran/ChangeLog:
	* error.cc: Update to add "m_" prefix to fields of
	diagnostic_info throughout.

gcc/testsuite/ChangeLog:
	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.cc: Update to
	add "m_" prefix to fields of diagnostic_info throughout.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-07-25 15:13:38 -04:00
GCC Administrator
ec8ceeab58 Daily bump. 2025-07-22 00:19:29 +00:00
Stefan Schulze Frielinghaus
cbf17db978 Error handling for hard register constraints
This implements error handling for hard register constraints including
potential conflicts with register asm operands.

In contrast to register asm operands, hard register constraints allow
more than just one register per operand.  Even more than just one
register per alternative.  For example, a valid constraint for an
operand is "{r0}{r1}m,{r2}".  However, this also means that we have to
make sure that each register is used at most once in each alternative
over all outputs and likewise over all inputs.  For asm statements this
is done by this patch during gimplification.  For hard register
constraints used in machine description, error handling is still a todo
and I haven't investigated this so far and consider this rather a low
priority.

gcc/ada/ChangeLog:

	* gcc-interface/trans.cc (gnat_to_gnu): Pass null pointer to
	parse_{input,output}_constraint().

gcc/analyzer/ChangeLog:

	* region-model-asm.cc (region_model::on_asm_stmt): Pass null
	pointer to parse_{input,output}_constraint().

gcc/c/ChangeLog:

	* c-typeck.cc (build_asm_expr): Pass null pointer to
	parse_{input,output}_constraint().

gcc/ChangeLog:

	* cfgexpand.cc (n_occurrences): Move this ...
	(check_operand_nalternatives): and this ...
	(expand_asm_stmt): and the call to gimplify.cc.
	* config/s390/s390.cc (s390_md_asm_adjust): Pass null pointer to
	parse_{input,output}_constraint().
	* gimple-walk.cc (walk_gimple_asm): Pass null pointer to
	parse_{input,output}_constraint().
	(walk_stmt_load_store_addr_ops): Ditto.
	* gimplify-me.cc (gimple_regimplify_operands): Ditto.
	* gimplify.cc (num_occurrences): Moved from cfgexpand.cc.
	(num_alternatives): Ditto.
	(gimplify_asm_expr): Deal with hard register constraints.
	* stmt.cc (eliminable_regno_p): New helper.
	(hardreg_ok_p): Perform a similar check as done in
	make_decl_rtl().
	(parse_output_constraint): Add parameter for gimplify_reg_info
	and validate hard register constrained operands.
	(parse_input_constraint): Ditto.
	* stmt.h (class gimplify_reg_info): Forward declaration.
	(parse_output_constraint): Add parameter.
	(parse_input_constraint): Ditto.
	* tree-ssa-operands.cc
	(operands_scanner::get_asm_stmt_operands): Pass null pointer
	to parse_{input,output}_constraint().
	* tree-ssa-structalias.cc (find_func_aliases): Pass null pointer
	to parse_{input,output}_constraint().
	* varasm.cc (assemble_asm): Pass null pointer to
	parse_{input,output}_constraint().
	* gimplify_reg_info.h: New file.

gcc/cp/ChangeLog:

	* semantics.cc (finish_asm_stmt): Pass null pointer to
	parse_{input,output}_constraint().

gcc/d/ChangeLog:

	* toir.cc: Pass null pointer to
	parse_{input,output}_constraint().

gcc/testsuite/ChangeLog:

	* gcc.dg/pr87600-2.c: Split test into two files since errors for
	functions test{0,1} are thrown during expand, and for
	test{2,3} during gimplification.
	* lib/scanasm.exp: On s390, skip lines beginning with #.
	* gcc.dg/asm-hard-reg-error-1.c: New test.
	* gcc.dg/asm-hard-reg-error-2.c: New test.
	* gcc.dg/asm-hard-reg-error-3.c: New test.
	* gcc.dg/asm-hard-reg-error-4.c: New test.
	* gcc.dg/asm-hard-reg-error-5.c: New test.
	* gcc.dg/pr87600-3.c: New test.
	* gcc.target/aarch64/asm-hard-reg-2.c: New test.
	* gcc.target/s390/asm-hard-reg-7.c: New test.
2025-07-21 13:05:26 +02:00
GCC Administrator
55b01e17c7 Daily bump. 2025-04-30 00:18:58 +00:00
Iain Buclaw
692b647070 d: Use __builtin_clear_padding for zeroing alignment holes after set
In an earlier change, a wrapper function was added to set
CONSTRUCTOR_ZERO_PADDING_BITS on all CONSTRUCTOR nodes. This removes all
the old generated calls to built-in memset and memcpy as zero padding is
now taken care of by the middle-end.

The remaining constructors that weren't getting zero padded was
ARRAY_TYPEs, so now `__builtin_clear_padding' is used to fill in all
alignment holes in constructed array literals where required.

	PR d/103044

gcc/d/ChangeLog:

	* d-tree.h (build_clear_padding_call): New prototype.
	* d-codegen.cc (build_clear_padding_call): New function.
	(build_memset_call): Remove generated call to __builtin_memcpy.
	(build_address): Replace generated call to __builtin_memset with
	__builtin_clear_padding.
	(build_array_from_exprs): Likewise.
	* expr.cc (ExprVisitor::visit (AssignExp *)): Remove generated call to
	__builtin_memset.
	(ExprVisitor::visit (ArrayLiteralExp *)): Likewise.  Insert call to
	__builtin_clear_padding after copying array into GC memory.
	(ExprVisitor::visit (StructLiteralExp *)): Remove generated call to
	__builtin_memset.
	* toir.cc (IRVisitor::visit (ReturnStatement *)): Likewise.
2025-04-29 21:56:30 +02:00
GCC Administrator
d776b20148 Daily bump. 2025-04-18 00:16:59 +00:00
Iain Buclaw
0eae20c899 d: Fix infinite loop regression in CTFE
An infinite loop was introduced by a previous refactoring in the
semantic pass for DeclarationExp nodes. Ensure the loop properly
terminates and add tests cases.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 956e73d64e.

gcc/testsuite/ChangeLog:

	* gdc.test/fail_compilation/test21247.d: New test.
	* gdc.test/fail_compilation/test21247b.d: New test.

Reviewed-on: https://github.com/dlang/dmd/pull/21248
2025-04-17 08:59:36 +02:00
GCC Administrator
60130b2d33 Daily bump. 2025-04-16 00:18:18 +00:00
Iain Buclaw
c5ffab99a5 d: Fix ICE: type variant differs by TYPE_MAX_VALUE with -g [PR119826]
Forward referenced enum types were never fixed up after the main
ENUMERAL_TYPE was finished.  All flags set are now propagated to all
variants after its mode, size, and alignment has been calculated.

	PR d/119826

gcc/d/ChangeLog:

	* types.cc (TypeVisitor::visit (TypeEnum *)): Propagate flags of main
	enum types to all forward-referenced variants.

gcc/testsuite/ChangeLog:

	* gdc.dg/debug/imports/pr119826b.d: New test.
	* gdc.dg/debug/pr119826.d: New test.
2025-04-16 01:44:27 +02:00
Iain Buclaw
074b2b0f91 d: Fix internal compiler error: in visit, at d/decl.cc:838 [PR119799]
This was caused by a check in the D front-end disallowing static
VAR_DECLs with a size `0'.

While empty structs in D are give the size `1', the same symbol coming
from ImportC modules do infact have no size, so allow C variables to
pass the check as well as array objects.

	PR d/119799

gcc/d/ChangeLog:

	* decl.cc (DeclVisitor::visit (VarDeclaration *)): Check front-end
	type size before building the VAR_DECL.  Allow C symbols to have a
	size of `0'.

gcc/testsuite/ChangeLog:

	* gdc.dg/import-c/pr119799.d: New test.
	* gdc.dg/import-c/pr119799c.c: New test.
2025-04-15 15:26:58 +02:00
Iain Buclaw
f5ed7d19c9 d: Fix ICE in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676 [PR119817]
The ImportVisitor method for handling the importing of overload sets was
pushing NULL_TREE to the array of import decls, which in turn got passed
to `debug_hooks->imported_module_or_decl', triggering the observed
internal compiler error.

NULL_TREE is returned from `build_import_decl' when the symbol was
ignored for being non-trivial to represent in debug, for example,
template or tuple declarations.  So similarly "skip" adding the symbol
when this is the case for overload sets too.

	PR d/119817

gcc/d/ChangeLog:

	* imports.cc (ImportVisitor::visit (OverloadSet *)): Don't push
	NULL_TREE to vector of import symbols.

gcc/testsuite/ChangeLog:

	* gdc.dg/debug/imports/m119817/a.d: New test.
	* gdc.dg/debug/imports/m119817/b.d: New test.
	* gdc.dg/debug/imports/m119817/package.d: New test.
	* gdc.dg/debug/pr119817.d: New test.
2025-04-15 15:04:13 +02:00
GCC Administrator
1fda2deeea Daily bump. 2025-04-13 00:17:09 +00:00
Iain Buclaw
9a7b6668f8 d: Add option to include imported modules in the compilation [PR109023]
Adds the ability to include imported modules in the compilation, as if
they were given on the command line.  When this option is enabled, all
imported modules are compiled except those that are part of libphobos.

	PR d/109023

gcc/d/ChangeLog:

	* d-compiler.cc: Include dmd/errors.h.
	(Compiler::onImport): Implement.
	* d-lang.cc (d_handle_option): Handle -finclude-imports.
	(d_parse_file): Run semantic on included imports.
	* gdc.texi: Document -finclude-imports.
	* lang.opt: Add finclude-imports.
	* lang.opt.urls: Regenerate.

gcc/testsuite/ChangeLog:

	* gdc.dg/torture/imports/pr109023.d: New test.
	* gdc.dg/torture/pr109023.d: New test.
2025-04-12 22:02:26 +02:00
Iain Buclaw
8a03d014ec d: Fix -fonly= argument only matches when including full path [PR119758]
Using `strcmp' to match the `-fonly=' argument with the input source
file made the feature inflexible to use.  By mistake, the driver was
also found to omit all other modules on the command line as well, which
differed from the documentation on the flag:

    Tell the compiler to parse and run semantic analysis on all modules
    on the command line, but only generate code for the given argument.

New tests added to check the feature, which didn't exist before.

	PR d/119758

gcc/d/ChangeLog:

	* d-lang.cc (d_parse_file): Use endswith in test for -fonly= argument.
	* d-spec.cc (lang_specific_driver): Rework -fonly= and pass all input
	files to the front-end compiler when the option is seen.

gcc/testsuite/ChangeLog:

	* gdc.dg/driver_fonly1.d: New test.
	* gdc.dg/driver_fonly2.d: New test.
	* gdc.dg/driver_fonly3.d: New test.
	* gdc.dg/imports/fonly.d: New test.
2025-04-12 22:02:26 +02:00
GCC Administrator
c9d9521af3 Daily bump. 2025-04-12 00:17:42 +00:00
Iain Buclaw
b905ce8caf d: Merge upstream dmd 1b34fea478, phobos 40ffbb364
D front-end changes:

	- Import latest fixes from dmd v2.111.1-rc.1.

Phobos changes:

	- Import latest fixes from phobos v2.111.1-rc.1.
	- Restore compatibility with older Linux platforms where
	  `getrandom' is unavailable.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 1b34fea478.

libphobos/ChangeLog:

	* src/MERGE: Merge upstream phobos 40ffbb364.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Call DRUNTIME_OS_FEATURES.
	* libdruntime/Makefile.am (AM_DFLAGS): Add OS_DFLAGS.
	* libdruntime/Makefile.in: Regenerate.
	* m4/druntime/os.m4 (DRUNTIME_OS_FEATURES): Define.
	* src/Makefile.am: Add OS_DFLAGS.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/testsuite_flags.in: Add OS_DFLAGS.
2025-04-11 13:01:19 +02:00
GCC Administrator
6284f555e8 Daily bump. 2025-04-10 00:18:06 +00:00
Iain Buclaw
cee353c265 d: Fix forward referenced enums missing type names in debug info [PR118309]
Calling `rest_of_type_compilation' as the D types were built meant that
debug info was being emitted before all forward references were
resolved, resulting in DW_AT_name's to be missing.

Instead, defer outputting type debug information until all modules have
been parsed and generated in `d_finish_compilation'.

	PR d/118309

gcc/d/ChangeLog:

	* modules.cc: Include debug.h
	(d_finish_compilation): Call debug_hooks->type_decl on all TYPE_DECLs.
	* types.cc: Remove toplev.h include.
	(finish_aggregate_type): Don't call rest_of_type_compilation or
	rest_of_decl_compilation on type.
	(TypeVisitor::visit (TypeEnum *)): Likewise.

gcc/testsuite/ChangeLog:

	* gdc.dg/debug/dwarf2/pr118309.d: New test.
2025-04-09 20:28:15 +02:00
Iain Buclaw
3e3b665cc7 d: Use CONSTRUCTOR_ZERO_PADDING_BITS in the D FE [PR117832]
Adds a new wrapper function for `build_constructor', and calls it
instead to ensure that all CONSTRUCTOR nodes explicitly created by the
front-end have CONSTRUCTOR_ZERO_PADDING_BITS set.

Some places may not be necessary as it's guaranteed for there to be no
padding in the type, such as D dynamic arrays.  Other places this gets
turned into a double-memset when optimizations are turned off, as the
front-end already generates a memset call to zero out all padding on
initializing a variable.  The optimizer sees through this so will
correctly clear all bits once, so this can be improved later as-needed.

	PR d/117832

gcc/d/ChangeLog:

	* d-tree.h (build_padded_constructor): New prototype.
	* d-codegen.cc (build_padded_constructor): New function.
	(d_array_value): Call it.
	(build_memset_call): Likewise.
	(build_struct_literal): Likewise.
	(underlying_complex_expr): Likewise.
	(build_array_from_val): Likewise.
	(build_array_from_exprs): Likewise.
	(d_build_call): Likewise.
	(get_frame_for_symbol): Likewise.
	* d-convert.cc (convert_for_rvalue): Likewise.
	(convert_for_assignment): Likewise.
	* decl.cc (class DeclVisitor): Likewise.
	* expr.cc (class ExprVisitor): Likewise.
	* modules.cc (layout_moduleinfo): Likewise.
	* typeinfo.cc (class TypeInfoVisitor): Likewise.
2025-04-09 14:49:14 +02:00
GCC Administrator
ca4e6e6317 Daily bump. 2025-04-09 00:18:02 +00:00
Iain Buclaw
639376154e d: Fix infinite loop in isAliasThisTuple
This reverts a change in the upstream D implementation of the compiler,
as the refactoring introduced a regression.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 51816cd01d.

Reviewed-on: https://github.com/dlang/dmd/pull/21155
2025-04-08 16:36:15 +02:00
GCC Administrator
8fbe7d2437 Daily bump. 2025-04-07 00:16:32 +00:00
Sandra Loosemore
6bf272ec7f Doc: make regenerate-opt-urls
I keep forgetting to do this....  :-(

gcc/c-family/ChangeLog
	* c.opt.urls: Regenerate.

gcc/d/ChangeLog
	* lang.opt.urls: Regenerate.
2025-04-06 02:28:36 +00:00
GCC Administrator
93acd068af Daily bump. 2025-04-03 00:18:15 +00:00
Iain Buclaw
a66de265ab d: Fix error using UFCS in a speculative context
This reverts a change in the upstream D implementation of the compiler,
as it is no longer necessary since another fix for opDispatch got
applied in the same area (merged in r12-6003-gfd43568cc54e17).

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd ed17b3e95d.

Reviewed-on: https://github.com/dlang/dmd/pull/21132
2025-04-02 22:01:57 +02:00
GCC Administrator
56988099af Daily bump. 2025-04-01 00:19:09 +00:00
Iain Buclaw
2d270bdc31 d: Bump front-end language version to v2.111.0
Merges the front-end language implementation and runtime library with
upstream dmd c6863be720, and the standard library with phobos 60034b56e.

Synchronizing with the upstream release of v2.111.0.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd c6863be720.
	* dmd/VERSION: Bump version to v2.111.0.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime c6863be720.
	* src/MERGE: Merge upstream phobos 60034b56e.
2025-03-31 20:11:20 +02:00
Iain Buclaw
9fadadbbbc d: Fix error with -Warray-bounds and -O2 [PR117002]
The record layout of class types in D don't get any tail padding, so it
is possible for the `classInstanceSize' to not be a multiple of the
`classInstanceAlignment'.

Rather than setting the instance alignment on the underlying
RECORD_TYPE, instead give the type an alignment of 1, which will mark it
as TYPE_PACKED.  The value of `classInstanceAlignment' is instead
applied to the DECL_ALIGN of both the static `init' symbol, and the
stack allocated variable used when generating `new' for a `scope' class.

	PR d/117002

gcc/d/ChangeLog:

	* decl.cc (aggregate_initializer_decl): Set explicit decl alignment of
	class instance.
	* expr.cc (ExprVisitor::visit (NewExp *)): Likewise.
	* types.cc (TypeVisitor::visit (TypeClass *)): Mark the record type of
	classes as packed.

gcc/testsuite/ChangeLog:

	* gdc.dg/torture/pr117002.d: New test.
2025-03-31 19:15:33 +02:00
GCC Administrator
4cdc5b505f Daily bump. 2025-03-31 00:17:59 +00:00
Sandra Loosemore
f7085e2314 Docs: make regenerate-opt-urls
gcc/c-family/ChangeLog
	* c.opt.urls: Regenerate.

gcc/d/ChangeLog
	* lang.opt.urls: Regenerate.

gcc/m2/ChangeLog
	* lang.opt.urls: Regenerate.
2025-03-30 22:13:11 +00:00
GCC Administrator
c7604808d1 Daily bump. 2025-03-27 00:19:18 +00:00
Iain Buclaw
7c4f409524 d: import __stdin causes compilation to pause while reading from stdin
Moves the special handling of reading from stdin out of the language
semantic routines. All references to `__stdin.d` have also been removed
from the front-end implementation.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 02a64d2e13.
2025-03-26 19:32:02 +01:00
GCC Administrator
6b36b659e3 Daily bump. 2025-03-24 00:17:16 +00:00
Iain Buclaw
597168191e d: Fix ICE type variant differs by TYPE_PACKED [PR117621]
Introduced by r13-1104-gf4c3ce32fa54c1, which had an accidental self
assignment of TYPE_PACKED when it should have been assigned to the
type's variants.

	PR d/117621

gcc/d/ChangeLog:

	* types.cc (finish_aggregate_type): Propagate TYPE_PACKED to variants.

gcc/testsuite/ChangeLog:

	* gdc.dg/pr117621.d: New test.
2025-03-23 13:34:05 +01:00
GCC Administrator
d8d6a61d1c Daily bump. 2025-03-23 00:17:38 +00:00