Age | Commit message (Collapse) | Author | Files | Lines |
|
Test case is https://golang.org/cl/375796.
Fixes golang/go#50439
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/375797
|
|
Adding type parameters was about to add a partial third version.
Remove the duplication to avoid that.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/375234
|
|
|
|
|
|
Do this separately from all other Copyright updates, as ChangeLog files
can be modified only separately.
|
|
Manual part of copyright year updates.
2022-01-03 Jakub Jelinek <jakub@redhat.com>
gcc/
* gcc.c (process_command): Update copyright notice dates.
* gcov-dump.c (print_version): Ditto.
* gcov.c (print_version): Ditto.
* gcov-tool.c (print_version): Ditto.
* gengtype.c (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.c (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.
|
|
Change the compiler to not add zero padding because of zero-sized
fields named "_", since those can't be referenced anyhow.
Change the sparc-linux64 epollevent struct to name the alignment
field "_", to avoid zero padding.
Fixes PR go/103847
PR go/103847
* godump.c (go_force_record_alignment): Name the alignment
field "_".
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/374914
|
|
|
|
I replaced and verified http:// links for various domains.
gcc/ada/ChangeLog:
* doc/share/gnu_free_documentation_license.rst: Replace http:// with https.
* gnat-style.texi: Likewise.
* gnat_rm.texi: Likewise.
* gnat_ugn.texi: Likewise.
gcc/d/ChangeLog:
* gdc.texi: Replace http:// with https.
gcc/ChangeLog:
* doc/contrib.texi: Replace http:// with https.
* doc/contribute.texi: Likewise.
* doc/extend.texi: Likewise.
* doc/gccint.texi: Likewise.
* doc/gnu.texi: Likewise.
* doc/implement-c.texi: Likewise.
* doc/implement-cxx.texi: Likewise.
* doc/include/fdl.texi: Likewise.
* doc/include/gpl_v3.texi: Likewise.
* doc/install.texi: Likewise.
* doc/invoke.texi: Likewise.
* doc/passes.texi: Likewise.
* doc/service.texi: Likewise.
* doc/sourcebuild.texi: Likewise.
* doc/standards.texi: Likewise.
gcc/fortran/ChangeLog:
* gfortran.texi: Replace http:// with https.
* intrinsic.texi: Likewise.
gcc/go/ChangeLog:
* gccgo.texi: Replace http:// with https.
gcc/jit/ChangeLog:
* docs/_build/texinfo/libgccjit.texi: Replace http:// with https.
* docs/cp/index.rst: Likewise.
* docs/cp/intro/index.rst: Likewise.
* docs/cp/intro/tutorial01.rst: Likewise.
* docs/cp/intro/tutorial02.rst: Likewise.
* docs/cp/intro/tutorial03.rst: Likewise.
* docs/cp/intro/tutorial04.rst: Likewise.
* docs/cp/topics/asm.rst: Likewise.
* docs/cp/topics/compilation.rst: Likewise.
* docs/cp/topics/contexts.rst: Likewise.
* docs/cp/topics/expressions.rst: Likewise.
* docs/cp/topics/functions.rst: Likewise.
* docs/cp/topics/index.rst: Likewise.
* docs/cp/topics/locations.rst: Likewise.
* docs/cp/topics/objects.rst: Likewise.
* docs/cp/topics/types.rst: Likewise.
* docs/index.rst: Likewise.
* docs/internals/index.rst: Likewise.
* docs/intro/index.rst: Likewise.
* docs/intro/tutorial01.rst: Likewise.
* docs/intro/tutorial02.rst: Likewise.
* docs/intro/tutorial03.rst: Likewise.
* docs/intro/tutorial04.rst: Likewise.
* docs/intro/tutorial05.rst: Likewise.
* docs/topics/asm.rst: Likewise.
* docs/topics/compatibility.rst: Likewise.
* docs/topics/compilation.rst: Likewise.
* docs/topics/contexts.rst: Likewise.
* docs/topics/expressions.rst: Likewise.
* docs/topics/function-pointers.rst: Likewise.
* docs/topics/functions.rst: Likewise.
* docs/topics/index.rst: Likewise.
* docs/topics/locations.rst: Likewise.
* docs/topics/objects.rst: Likewise.
* docs/topics/performance.rst: Likewise.
* docs/topics/types.rst: Likewise.
|
|
|
|
This commit allows users to specify a path to their "etags"
executable for use when doing "make tags".
I based this patch off of this one from upstream automake:
https://git.savannah.gnu.org/cgit/automake.git/commit/m4?id=d2ccbd7eb38d6a4277d6f42b994eb5a29b1edf29
This means that I just supplied variables that the user can override
for the tags programs, rather than having the configure scripts
actually check for them. I handle etags and ctags separately because
the intl subdirectory has separate targets for them. This commit
only affects the subdirectories that use handwritten Makefiles; the
ones that use automake will have to wait until we update the version
of automake used to be 1.16.4 or newer before they'll be fixed.
Addresses #103021
gcc/ChangeLog:
PR other/103021
* Makefile.in: Substitute CTAGS, ETAGS, and CSCOPE
variables. Use ETAGS variable in TAGS target.
* configure: Regenerate.
* configure.ac: Allow CTAGS, ETAGS, and CSCOPE
variables to be overridden.
gcc/ada/ChangeLog:
PR other/103021
* gcc-interface/Make-lang.in: Use ETAGS variable in
TAGS target.
gcc/c/ChangeLog:
PR other/103021
* Make-lang.in: Use ETAGS variable in TAGS target.
gcc/cp/ChangeLog:
PR other/103021
* Make-lang.in: Use ETAGS variable in TAGS target.
gcc/d/ChangeLog:
PR other/103021
* Make-lang.in: Use ETAGS variable in TAGS target.
gcc/fortran/ChangeLog:
PR other/103021
* Make-lang.in: Use ETAGS variable in TAGS target.
gcc/go/ChangeLog:
PR other/103021
* Make-lang.in: Use ETAGS variable in TAGS target.
gcc/objc/ChangeLog:
PR other/103021
* Make-lang.in: Use ETAGS variable in TAGS target.
gcc/objcp/ChangeLog:
PR other/103021
* Make-lang.in: Use ETAGS variable in TAGS target.
intl/ChangeLog:
PR other/103021
* Makefile.in: Use ETAGS variable in TAGS target,
CTAGS variable in CTAGS target, and MKID variable
in ID target.
* configure: Regenerate.
* configure.ac: Allow CTAGS, ETAGS, and MKID
variables to be overridden.
libcpp/ChangeLog:
PR other/103021
* Makefile.in: Use ETAGS variable in TAGS target.
* configure: Regenerate.
* configure.ac: Allow ETAGS variable to be overridden.
libiberty/ChangeLog:
PR other/103021
* Makefile.in: Use ETAGS variable in TAGS target.
* configure: Regenerate.
* configure.ac: Allow ETAGS variable to be overridden.
|
|
Fix the Create_func_descriptors pass to traverse the subexpressions of
the function in a Call_expression. There are no subexpressions in the
normal case of calling a function a method directly, but there are
subexpressions when in code like F().M() when F returns an interface type.
Forgetting to traverse the function subexpressions was almost entirely
hidden by the fact that we also created the necessary thunks in
Bound_method_expression::do_flatten and
Interface_field_reference_expression::do_get_backend. However, when
the thunks were created there, they did not go through the
order_evaluations pass. This almost always worked, but failed in the
case in which the function being thunked returned multiple results, as
order_evaluations takes the necessary step of moving the
Call_expression into its own statement, and that would not happen when
order_evaluations was not called. Avoid hiding errors like this by
changing those methods to only lookup the previously created thunk,
rather than creating it if it was not already created.
The test case for this is https://golang.org/cl/363156.
Fixes https://golang.org/issue/49512
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/363274
|
|
The original compiler directive support was only for //line at the
start of a line and for //go: comments before function declarations.
When support was added for //go:notinheap for types and //go:embed for
variables the code did not adapt to permit spaces before the comment
or to permit the comments in var() or type() groups. This change
corrects those omissions.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/358699
|
|
Tweak a couple of places in the types code to use nullptr instead of
NULL to work around a template matching quirk when using certain build
compilers.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/354151
|
|
This is a minor cleanup to ensure that the various Expression::do_type
methods don't have to worry about the possibility that the Expression
has not been lowered.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/353140
|
|
|
|
gcc/c-family/ChangeLog:
* c-opts.c (c_common_init_options_struct): Set also
x_flag_default_complex_method.
gcc/ChangeLog:
* common.opt: Add new variable flag_default_complex_method.
* opts.c (finish_options): Handle flags related to
x_flag_complex_method.
* toplev.c (process_options): Remove option handling related
to flag_complex_method.
gcc/go/ChangeLog:
* go-lang.c (go_langhook_init_options_struct): Set also
x_flag_default_complex_method.
gcc/lto/ChangeLog:
* lto-lang.c (lto_init_options_struct): Set also
x_flag_default_complex_method.
gcc/testsuite/ChangeLog:
* gcc.c-torture/compile/attr-complex-method-2.c: New test.
* gcc.c-torture/compile/attr-complex-method.c: New test.
|
|
In Go 1.17 the gc toolchain changed to set runtime.GOROOT in cmd/link
(previously it was runtime/internal/sys.GOROOT). Do the same in libgo.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/351313
gotools/:
* Makefile.am (check-runtime): Add goroot.go to --extrafiles.
* Makefile.in: Regenerate.
|
|
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/350414
|
|
Nothing can take the address of that field anyhow.
Fixes PR go/101994
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/343873
|
|
When compiling append(s, make([]typ, ln)...), where typ has a pointer,
and the append fits within the existing capacity of s, the condition
used to clear out the new elements was reversed.
Fixes golang/go#47771
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/344189
|
|
Fixes PR go/102102
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/348015
|
|
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/343729
|
|
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/342189
|
|
Didn't notice earlier because this code is only used on systems that
do not support -fsplit-stack.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/342051
|
|
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341629
|
|
This is the gofrontend version of https://golang.org/cl/264480.
For golang/go#42076
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/340609
|
|
Fixes PR go/101851
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341330
|
|
For golang/go#19367
For golang/go#40481
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/340549
|
|
Following the previous CL, in the escape analysis list all the
expected runtime calls, and fail if an unexpected one is seen.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/340397
|
|
This is the gofrontend version of https://golang.org/cl/289152.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/339690
|
|
In the places where we handle builtin functions, list all
supported ones, and fail if an unexpected one is seen. So if a
new builtin function is added in the future we can detect it,
instead of silently treating it as nonescaping.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/339992
|
|
Previous CLs add new language constructs in Go 1.17, specifically,
unsafe.Add, unsafe.Slice, and conversion from a slice to a pointer
to an array. This CL handles them in the escape analysis.
At the point of the escape analysis, unsafe.Add and unsafe.Slice
are still builtin calls, so just handle them in data flow.
Conversion from a slice to a pointer to an array has already been
lowered to a combination of compound expression, conditional
expression and slice info expressions, so handle them in the
escape analysis.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/339671
|
|
The only different between selectnbrecv and selectnbrecv2 is the later
set the input pointer value by second return value from chanrecv.
So by making selectnbrecv return two values from chanrecv, we can get
rid of selectnbrecv2, the compiler can now call only selectnbrecv and
generate simpler code.
This is the gofrontend version of https://golang.org/cl/292890.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/339529
|
|
When checking a slice to pointer-to-array conversion, I forgot to
verify that the elements types are identical.
For golang/go#395
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/339329
|
|
Panic if the slice is too short.
For golang/go#395
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/338630
|
|
For golang/go#19367
For golang/go#40481
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/338949
|
|
If a package declares a method on an alias type, the alias would be
used in the export data. This would then trigger a compiler
assertion on import: we should not be adding methods to aliases.
Fix the problem by ensuring that receiver types do not use alias types.
This seems preferable to consistently avoiding aliases in export data,
as aliases can cross packages. And it's painful to try to patch this
while writing the export data, as at that point all the types are known.
Test case is https://golang.org/cl/335172.
Fixes golang/go#47131
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/335729
|
|
PR bootstrap/101374
They cause a warning with the updated GCC -Warray-bounds option.
Replace them with calls to abort, which for our purposes is fine.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/333409
|
|
|
|
We were generating temporaries for composite literals when a
conversion to interface type was required. However, Cherry's
https://golang.org/cl/176459 changed the compiler to insert explicit
type conversions. And those explicit type conversions insert the
required temporaries in Type_conversion_expression::do_flatten.
So in practice the composite literal do_flatten methods would never
insert temporaries, as the values they see would always be multi_eval_safe.
So just remove the unnecessary do_flatten methods.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/331691
|
|
* go-gcc.cc (Gcc_backend::static_chain_variable): Set
DECL_NAMELESS on the new decl.
(Gcc_backend::temporary_variable): Likewise.
(Gcc_backend::function): Set DECL_NAMELESS on the result decl.
|
|
For a composite literal we only need to introduce a temporary variable
if we may be converting to an interface type, so only do it then.
This saves over 80% of compilation time when using gccgo to compile
cmd/internal/obj/x86, as the GCC middle-end spends a lot of time
pointlessly computing interactions between temporary variables.
For PR debug/101064
For golang/go#46600
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/331513
|
|
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/326772
|
|
|
|
* gccgo.texi (Function Names): Don't HTML quote ampersand.
|
|
|
|
To implement this, change the backend to use flag bits for variables.
Fixes https://gcc.gnu.org/PR100537
PR go/100537
* go-gcc.cc (class Gcc_backend): Update methods that create
variables to take a flags parameter.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/322129
|
|
|
|
This file is copied from a different repo and should not be changed
directly in the GCC repo.
|