summaryrefslogtreecommitdiffstats
path: root/gcc/go/gofrontend
Commit message (Collapse)AuthorAgeFilesLines
...
* compiler: Fix unsafe.Sizeof for named structs with named struct fields.ian2012-06-072-2/+14
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188295 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't crash for invalid constant types for && or ||.ian2012-05-301-15/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188033 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't create a closure if not needed.ian2012-05-251-23/+11
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187897 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix erroneous use of VEC.ian2012-05-181-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187664 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix assembler names of types defined in functions.ian2012-05-162-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187574 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix taking address of constant outside of function.ian2012-05-151-9/+40
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187565 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Sort array constructors by index.ian2012-05-151-10/+48
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187560 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't try to take the address of a constant.ian2012-05-151-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187553 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Use -fgo-pkgpath.ian2012-05-141-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187485 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Add -fgo-pkgpath option.ian2012-05-0911-307/+397
| | | | | | | | | | | | | | | | | | | * lang.opt: Add -fgo-pkgpath. * go-lang.c (go_pkgpath): New static variable. (go_prefix): New static variable. (go_langhook_init): Pass go_pkgpath and go_prefix to go_create_gogo. (go_langhook_handle_option): Handle -fgo-pkgpath. Change -fgo-prefix handling to just set go_prefix. * go-c.h (go_set_prefix): Don't declare. (go_create_gogo): Add pkgpath and prefix to declaration. * go-gcc.cc (Gcc_backend::global_variable): Change unique_prefix to pkgpath. Don't include the package name in the asm name. * gccgo.texi (Invoking gccgo): Document -fgo-pkgpath. Update the docs for -fgo-prefix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187356 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix an ICE when parsing 0xdie, reject token 0x123i.ian2012-05-071-1/+3
| | | | | | | | | The lexer used to incorrectly accept a token like 0x123i and interpreted it as 123i. It also used to die when encountering 0xdie. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187266 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix ICE in handling of rune constants.ian2012-05-071-1/+4
| | | | | | | | | | | | This patch corrects an ICE in handling on constant expressions such as const r = ^'a' Part of issue 9. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187264 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: reject NOT operator on integer types.ian2012-05-071-3/+6
| | | | | | | | | | The Go specification only accepts the NOT operator on boolean types. Fixes issue 10. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187262 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Correct parse of for with possible composite literal.ian2012-05-042-24/+48
| | | | | | | Fixes, e.g., "for first := true; first; first = false {". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187176 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Error if importing same package twice with same name.ian2012-05-041-5/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187142 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Build import tables as needed for imported interfaces.ian2012-05-031-0/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187111 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix order of initialization bug with global var a, b = f().ian2012-05-034-18/+85
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187103 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (ld_plugin_symbol_resolution_names): Move to symtab.chubicka2012-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cgraph_asm_nodes, cgraph_asm_last_node): Move to cgraphunit.c (cgraph_add_to_same_comdat_group): Remove. (cgraph_add_asm_node): Move to cgraphunit.c. (cgraph_make_decl_local): Move to symtab.c (cgraph_make_node_local_1): Update. (cgraph_can_remove_if_no_direct_calls_and): Update. (used_from_object_file_p): Update. (resolution_used_from_other_file_p): Move to symtab.c (cgraph_used_from_object_file_p): move to symtab.c (verify_cgraph_node): Verify same comdat groups. * cgraph.h (cgraph_asm_node): Rename to ... (asm_node): ... this one. (cgraph_asm_nodes): Rename to ... (asm_nodes): ... this one. (symtab_add_to_same_comdat_group): New function. (symtab_dissolve_same_comdat_group_list): New function. (symtab_used_from_object_file_p): Declare. (symtab_make_decl_local): Declare. (cgraph_add_to_same_comdat_group): Remove. (cgraph_add_asm_node): Remove. (cgraph_used_from_object_file_p, varpool_used_from_object_file_p): Remove. (cgraph_finalize_compilation_unit): Rename to ... (finalize_compilation_unit): ... this one. (cgraph_optimize): Rename to .... (compile): ... this one. (add_asm_node): Declare. (fixup_same_cpp_alias_visibility): Declare. (cgraph_make_decl_local): Remove. (varpool_assemble_pending_decls): Rename to ... (varpool_output_variables): ... this one. (varpool_remove_unreferenced_decls): Remove. * ipa-inline-transform.c (clone_inlined_nodes): Dissolve comdat groups. (preserve_function_body_p): Make static. * toplev.c (compile_file): Update comments; update. * cgraphunit.c: Update comments. (cgraph_expand_all_functions): Rename to ... (expand_all_functions): ... this one; update. (cgraph_mark_functions_to_output): Rename to ... (mark_functions_to_output): ... this one; cleanup. (cgraph_output_pending_asms): Remove prototype. (asm_nodes, asm_last_node): New static vars. (cgraph_process_new_functions): Update. (cgraph_reset_node): Cleanup; add comment. (cgraph_add_new_function): Update. (cgraph_output_pending_asms): Rename to ... (output_asm_statements): ... this one. (add_asm_node): New function. (fixup_same_cpp_alias_visibility): New function based on code in cgraph_analyze_function. (cgraph_analyze_function): Use it. (cgraph_order_sort): Update. (cgraph_output_in_order): Update. (cgraph_function_versioning): Update. (cgraph_optimize): Rename to ... (compile): ... this one; initialize streamer hooks here. (cgraph_finalize_compilation_unit): Rename to ... (finalize_compilation_unit): ... this one; do not initialize streamer hook here. * lto-streamer-out.c (lto_output_toplevel_asms): Update. * dwarf2out.c: Update ocmment. * optimize.c (maybe_clone_body): Use symtab_add_to_same_comdat_group. * method.c (use_thunk): Likewise. * semantics.c (maybe_add_lambda_conv_op): Likewise. * decl2.c (maybe_emit_vtables): Likewise. (cp_write_global_declarations): Use finalize_compilation_unit. * parser.c (cp_parser_asm_definition): Use add_asm_node. * lto-streamer-in.c (lto_input_toplevel_asms): Use add_asm_node * c-decl.c (c_write_global_declarations): Use finalize_compilation_unit. * langhooks.c (write_global_declarations): Update. * ipa.c (cgraph_externally_visible_p): Update. (dissolve_same_comdat_group_list): Remove. (function_and_variable_visibility): Update. * symtab.c: Inlcude lto-streamer.h and rtl.h (ld_plugin_symbol_resolution_names): New. (symtab_add_to_same_comdat_group): New. (symtab_dissolve_same_comdat_group_list): New. (resolution_used_from_other_file_p): Move here from cgraph.c (symtab_used_from_object_file_p): New. (symtab_make_decl_local): New. * passes.c (register_pass): Update comments. * c-parser.c (c_parser_asm_definition): Update. * varpool.c (varpool_analyze_node): Use fixup_same_cpp_alias_visibility. (varpool_remove_unreferenced_decls): Make static. (varpool_assemble_pending_decls): Rename to ... (varpool_output_variables): ... this one; call varpool_remove_unreferenced_decls. (varpool_used_from_object_file_p): Remove. * gogo-tree.cc (Gogo::write_globals): Use finalize_compilation_unit. * gcc-interface/utils.c (rest_of_subprog_body_compilation): Update comment. (gnat_write_global_declarations): Use finalize_compilation_unit. * f95-lang.c (gfc_finish): Update comments. * lto.c (lto_main): Use compile (). * lto-partition.c (partition_cgraph_node_p): Use symtab_used_from_object_file_p. (partition_varpool_node_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186998 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix some crashes on invalid code.ian2012-04-282-2/+11
| | | | | | | Fixes issue 7. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186929 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Use less memory for array/slice literals.ian2012-04-281-97/+177
| | | | | | | Fixes issue 8 in gofrontend issues list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186926 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix order of evalation for m[0] = len(m) when m is a map.ian2012-04-241-6/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186772 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Reject invalid composite literals.ian2012-04-241-1/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186766 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Error for invalid use of ... in call.ian2012-04-241-2/+22
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186739 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Correct handling of negative zero floating constant.ian2012-04-231-1/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186722 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't call cgraph_mark_needed_node.ian2012-04-201-1/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186644 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, runtime: Add explicit checks for zero and overflow division.ian2012-04-202-27/+112
| | | | | | | | | * lang.opt: Add -fgo-check-divide-zero and -fgo-check-divide-overflow. * gccgo.texi (Invoking gccgo): Document new options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186637 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix infinite recursion in string constant evaluation.ian2012-04-161-2/+16
| | | | | | | | | | | | | Fixes compilation of incorrect code: const f, g = g, f func S() []byte { return []byte(f) } The problem was already handled for numerical constants. Part of issue 3186 (go). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186511 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix order of evaluation of struct composite literals.ian2012-03-302-7/+47
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185990 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, libgo: unsafe.{Sizeof,Alignof,Offsetof} return uintptr.ian2012-03-292-9/+13
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185946 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix null-dereference on invalid len() arg.ian2012-03-281-2/+2
| | | | | | | | | | | | This patch fixes an ICE caused by syntax errors in arguments to unary built-in functions like len(). Updates issue 7. From Rémy Oudompheng. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185935 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: avoid an ICE on bound interface methods used as values.ian2012-03-281-1/+2
| | | | | | | Updates issue 7. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185933 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix method finalization of unnamed structs.ian2012-03-281-1/+5
| | | | | | | | | | Used to trigger an ICE on var v struct{I}; type I interface{} Updates issue 7. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185931 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: fix crashes.ian2012-03-282-1/+3
| | | | | | | | | | | | | The compiler would crash on: if true || x, y := 1, 2 {} and var s string s = append(s, "hello") Reported in issue 3186. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185928 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Rewrite handling of untyped numeric constants.ian2012-03-285-2054/+1667
| | | | | | | | Fixes various bugs when, e.g., using float or complex constants in integer contexts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185925 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Be more careful to follow GENERIC type rules.ian2012-03-091-6/+9
| | | | | | | | * go-gcc.cc (Gcc_backend::assignment_statement): Convert the rhs to the lhs type if necessary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185128 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Correct handling of sink receiver.ian2012-03-091-3/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185127 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't initialize zero sized variables.ian2012-03-081-1/+3
| | | | | | | | | | | | | | * go-gcc.cc (Gcc_backend::init_statement): Don't initialize a zero-sized variable. (go_non_zero_struct): New global variable. (Gcc_backend::non_zero_size_type): New function. (Gcc_backend::global_variable): Don't build an assignment for a zero-sized value. * go-c.h (go_non_zero_struct): Declare. * config-lang.in (gtfiles): Add go-c.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185115 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't crash on array assignment.ian2012-03-081-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185092 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Don't crash if writing type functions too late due to error.ian2012-03-072-0/+11
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185080 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix struct inheriting interface with varargs method.ian2012-03-071-2/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185060 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to weekly.2012-02-14 release.ian2012-03-021-54/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184798 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Reliably give errors on misuse of multiple value call.ian2012-03-011-13/+16
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184755 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix varargs functions that call recover.ian2012-03-012-1/+8
| | | | | | | Also fix a couple of crashes on invalid code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184751 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix handling of indirection of circular types.ian2012-03-011-18/+22
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184686 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Avoid some compiler crashes on invalid code.ian2012-03-012-3/+4
| | | | | | | | | * go-gcc.cc (class Gcc_tree): Add set_tree method. (set_placeholder_pointer_type): When setting to a pointer to error, set to error_mark_node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184684 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix unary ^ applied to typed signed integer constant.ian2012-03-011-3/+22
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184681 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Avoid various crashes on error conditions.ian2012-02-292-14/+34
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184675 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Fix handling of invalid types within invalid types.ian2012-02-292-20/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184674 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Permit an empty interface to be embedded multiple times.ian2012-02-181-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184363 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler: Permit (_) on left hand side of =.ian2012-02-171-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184356 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud