Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixes golang/go#11548.
Reviewed-on: https://go-review.googlesource.com/13794
From-SVN: r227830
|
|
Fixes golang/go#12319.
Reviewed-on: https://go-review.googlesource.com/13931
From-SVN: r227813
|
|
If the compiler supports split-stack but we are using a gold linker that
does not, as happens on PPC with current GCC but old gold, then we need
to compile the Go code with -fno-split-stack to avoid a linker error
avoid the inability to call from split-stack code to non-split-stack
code.
Reviewed-on: https://go-review.googlesource.com/14598
From-SVN: r227811
|
|
PPC has split-stack support in current GCC, but old version of gold will
reject attempts to link PPC split-stack and non-split-stack code
together. Test for that, and don't compile the C code with
-fsplit-stack if it doesn't work.
Reviewed-on: https://go-review.googlesource.com/14594
From-SVN: r227802
|
|
This restores https://golang.org/cl/6081043 which was lost accidentally
when updating a new version of libgo in https://golang.org/cl/22440043 .
Reviewed-on: https://go-review.googlesource.com/14569
From-SVN: r227784
|
|
This avoids linker warnings when linking against glibc, as apparently
arm64 GNU/Linux does not support the ustat system call.
Also update to automake 1.11.6, as that is the new GCC standard.
Reviewed-on: https://go-review.googlesource.com/14567
From-SVN: r227777
|
|
When evaluating a constant expression, the gofrontend would incorrectly
force each operand to be represented as the resulting type before
checking if the operation was valid with the untyped constants.
According to the language specification on constant
expressions(http://golang.org/ref/spec#Constant_expressions): "Untyped
boolean, numeric, and string constants may be used as operands wherever
it is legal to use an operand of boolean, numeric, or string type,
respectively."
Fixes golang/go#11566.
Reviewed-on: https://go-review.googlesource.com/12716
From-SVN: r227758
|
|
Fixes golang/go#11577.
Reviewed-on: https://go-review.googlesource.com/14182
From-SVN: r227699
|
|
Reviewed-on: https://go-review.googlesource.com/13421
From-SVN: r227673
|
|
From Rainer Orth.
Solaris 12 changes the stat_[amc]tim members of struct stat from
timestruc_t to timespec_t for XPG7 compatiblity, thus breaking the libgo
build. The following patch checks for this change and uses the common
stat_atim.go if appropriate.
Reviewed-on: https://go-review.googlesource.com/14495
From-SVN: r227665
|
|
The gcc backend throws an internal error when trying to get the size
of a type which is larger than the amount of address space on the
machine. This patch catches this error and reports it in a user
friendly way.
Fixes golang/go#11554.
Reviewed-on: https://go-review.googlesource.com/13684
* go-gcc.cc (Gcc_backend::type_size): Return -1 for
unrepresentable size.
From-SVN: r227656
|
|
Fixes golang/go#11616.
Reviewed-on: https://go-review.googlesource.com/13688
From-SVN: r227604
|
|
Fixes golang/go#12324.
Reviewed-on: https://go-review.googlesource.com/13988
From-SVN: r227427
|
|
When the compiler failed to evaluate a numeric constant because
because it was erroneous, there was no way for parent nodes to
discover the error and lower themselves into error nodes. This patch
now uses the NC_INVALID enumerator to mark numeric constants with a
known, reported error.
Fixes golang/go#11541.
Reviewed-on: https://go-review.googlesource.com/13904
From-SVN: r227420
|
|
When converting a signed or unsigned integer value into a constant
string, if the integer does not fit into the Go "int" type, the string
will become "\uFFFD."
Fixes golang/go#11525.
Reviewed-on: https://go-review.googlesource.com/13906
From-SVN: r227395
|
|
Fixes golang/go#11527.
Reviewed-on: https://go-review.googlesource.com/13905
From-SVN: r227332
|
|
Fixes golang/go#12317.
Reviewed-on: https://go-review.googlesource.com/13908
From-SVN: r227285
|
|
Fixes golang/go#12316.
Reviewed-on: https://go-review.googlesource.com/13907
From-SVN: r227284
|
|
The gofrontend would crash when trying to find the initialization
order of a variable list where one of the listed variables was an
invalid redefinition of another in a call statement. This patch
fixes initialization from call statements to consider invalid
redefinitions before recording dependency information.
Fixes golang/go#11543.
Reviewed-on: https://go-review.googlesource.com/13895
From-SVN: r227276
|
|
Fixes golang/go#11544.
Reviewed-on: https://go-review.googlesource.com/13893
From-SVN: r227245
|
|
The gofrontend would crash after hitting an unreachable state while
trying to determine the type of an arithmetic expression involving
non-numeric values. Instead of crashing, it should fail gracefully
if the relevant error is already reported.
Fixes golang/go#11537.
Reviewed-on: https://go-review.googlesource.com/13793
From-SVN: r227227
|
|
Fixes golang/go#11529.
Reviewed-on: https://go-review.googlesource.com/13790
From-SVN: r227201
|
|
When a numeric literal with leading zeroes was seen in the parser, it
would only be accepted if it were a valid hex or octal literal. Any
invalid numeric literal would be split up into multiple tokens: the
valid hex/octal literal followed by the rest of the characters.
Instead, when scanning a numeric literal with leading zeroes, always
accept the number and give an appropriate error if the accepted number
does not fit in the expected base.
Fixes golang/go#11532, golang/go#11533.
Reviewed-on: https://go-review.googlesource.com/13791
From-SVN: r227193
|
|
Avoid an off-by-one error when checking the start index of a string
slice by allowing the start index to be the string length instead
of the string length - 1.
Fixes golang/go#11522.
Reviewed-on: https://go-review.googlesource.com/13030
From-SVN: r227191
|
|
Fixes golang/go#11546.
Reviewed-on: https://go-review.googlesource.com/13795
From-SVN: r227184
|
|
When a function is declared and named with the blank identifier, only
the syntax is checked. This patch modifies the parser to add a dummy
node for each function declaration with a blank identifier name that
will be type checked like any function declaration.
Fixes golang/go#11535.
Reviewed-on: https://go-review.googlesource.com/13792
From-SVN: r227160
|
|
*-linux-gnu)
PR tree-optimization/67284
* go-gcc.cc (Gcc_backend::define_builtin): Add NORETURN_P parameter.
Set TREE_THIS_VOLATILE.
(Gcc_backend::Gcc_backend): Mark __builtin_trap as a noreturn call.
Pass false to the rest of define_builtin calls.
From-SVN: r227134
|
|
When the print builtins are called with no arguments, the compiler
issues a warning and crashes when trying to produce the backend
representation for the arguments.
Fixes golang/go#11526.
Reviewed-on: https://go-review.googlesource.com/13131
From-SVN: r227039
|
|
Avoid ps padding issues. Make sure we locate and kill just the sleep
process.
Reviewed-on: https://go-review.googlesource.com/13634
From-SVN: r227037
|
|
gccgo used to crash when presented with an invalid receiver type in a
method. Instead, unnamed receiver types should report an error.
Fixes golang/go#11557.
Reviewed-on: https://go-review.googlesource.com/13245
From-SVN: r226899
|
|
Between the lowering and flattening passes of the compiler, there are
several passes that modify the lowered Go parse tree and as errors are
discovered, several nodes transform into error nodes. However, for a
higher level node such as a construction expression, the erroneous
nodes in the subtrees might not propagate their error. The flatten
phase for a node now looks for errors in the subtree and flattens the
node into an error node if any are found.
Fixes golang/go#11559, golang/go#11536, golang/go#11558.
Reviewed-on: https://go-review.googlesource.com/13097
From-SVN: r226845
|
|
When parsing a malformed array type, i.e. invalid length, gccgo
would loop indefinitely based off of a uninitialized length variable.
Fixes golang/go#11539.
Reviewed-on: https://go-review.googlesource.com/13066
From-SVN: r226825
|
|
When parsing a malformed function declaration with invalid parameters,
gccgo would infinitely loop looking for the end of the function
declaration.
Fixes golang/go#11530, golang/go#11531.
Reviewed-on: https://go-review.googlesource.com/13065
From-SVN: r226795
|
|
On comments, the specification says
(http://golang.org/ref/spec#Comments): General comments start with the
character sequence /* and continue through the character sequence */.
A general comment containing one or more newlines acts like a newline,
otherwise it acts like a space.
Fixes golang/go#11528.
Reviewed-on: https://go-review.googlesource.com/13064
From-SVN: r226794
|
|
Fixes golang/go#11568.
Reviewed-on: https://go-review.googlesource.com/12653
From-SVN: r226788
|
|
If the timeout subshell has no child processes,
the "xargs | kill" will fail. Ensure there is
some input for kill before calling it.
Reviewed-on: https://go-review.googlesource.com/13295
From-SVN: r226719
|
|
Fixes golang/go#11547.
Reviewed-on: https://go-review.googlesource.com/13031
From-SVN: r226598
|
|
When determining the type of a complex expression, it is important
to recognize cases where a complex value can be represented as a
real number.
Fixes golang/go#11572.
Reviewed-on: https://go-review.googlesource.com/12541
From-SVN: r226596
|
|
Reviewed-on: https://go-review.googlesource.com/13095
From-SVN: r226543
|
|
The struct RawSockaddr contains a field Data which
should be uint8 on ppc64 and ppc64le, but is declared
as int8 in gccgo. This change adds a two new files
which contain the structure declaration for
RawSockaddr, one with the correct types for for ppc64
and ppc64le, and the other for non-ppc64 platforms.
Fixes golang/go#11469
Reviewed-on: https://go-review.googlesource.com/11946
From-SVN: r226533
|
|
Fixes golang/go#11573.
Reviewed-on: https://go-review.googlesource.com/12508
From-SVN: r226529
|
|
There is no need to make type descriptors for named types when there
are errors during package compilation. Particularly, if the error in
package compilation is from a malformed named type, there is no
guarantee a type descriptor can be created.
Fixes golang/go#11560.
Reviewed-on: https://go-review.googlesource.com/12792
From-SVN: r226527
|
|
This change modifies the "gotest" shell script
to kill all processes, including "sleep", spawned
by the timeout subshell. This prevents the sleep
process from living beyond the gotest process.
BACKGROUND
The "gotest" shell script spawns "sleep" processes
in the background to kill off test cases that run
past their specified timeout. There are commands
included that appear to kill the sleep process,
but they only kill the parent shell, causing the
sleep process to reparent.
The orphaned sleep process can cause issues when
gotest is run under some build systems, such as
Ninja [0]. The particular issue with Ninja is the
method it uses to identify terminated processes:
it creates a pipe, passes the write end to the
child process, and waits for EOF. In the case of
libgo/gotest, the orphaned sleep process inherits
the pipe FD and keeps it open for 4 minutes by
default.
[0] https://github.com/martine/ninja
Reviewed-on: https://go-review.googlesource.com/12227
From-SVN: r226526
|
|
‘__builtin_frame_address’ with a nonzero argument is unsafe [-Werror=frame-address])
PR go/67101
runtime: Remove call to __builtin_frame_address.
__builtin_frame_address was only supposed to use nonzero arguments
for debugging purposes. Calling it with nonzero arguments can have
unpredictable results and uses are now marked unsafe when
-Wframe-address is enabled.
Reviewed-on: https://go-review.googlesource.com/13063
From-SVN: r226525
|
|
Errors reported from malformed builtin calls are handled in a later
pass than the one in which they are detected. If a malformed builtin
call is lowered into an error expression too early, these errors will
never be reported.
Fixes golang/go#11561.
Reviewed-on: https://go-review.googlesource.com/12778
From-SVN: r226459
|
|
Function declarations don't create a block where the variables listed
in the parameter list are declared. Because there are no variables
declared, the types of the parameter variables is unchecked, allowing
for invalid values to be used as the type. This patch adds a special
case to the check_types pass for function declarations.
Fixes golang/go#11567.
Reviewed-on: https://go-review.googlesource.com/12662
From-SVN: r226456
|
|
Fixes golang/go#11569.
Reviewed-on: https://go-review.googlesource.com/12652
From-SVN: r226452
|
|
According to the spec, http://golang.org/ref/spec#Built-in_functions:
"built-in functions do not have standard Go types, so they can only
appear in call expressions; they cannot be used as function values."
Fixes golang/go#11570.
Reviewed-on: https://go-review.googlesource.com/12543
From-SVN: r226448
|
|
* go-lang.c (go_langhook_init_options_struct): Don't set
x_flag_split_stack.
(go_langhook_post_options): Set it here instead.
From-SVN: r226428
|
|
In a recent change to mksysinfo.sh, a space was missing on
some lines which caused the libgo build to hang on some
systems. This corrects that problem.
Fixes golang/go#11924
Reviewed-on: https://go-review.googlesource.com/12835
From-SVN: r226366
|