lto-tree.h (lang_decl): Add variable_size GTY option.
[gcc.git] / gcc / go / ChangeLog
1 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
2
3 * go-lang.c (lang_decl): Add variable_size GTY option.
4
5 2012-05-09 Ian Lance Taylor <iant@google.com>
6
7 * lang.opt: Add -fgo-pkgpath.
8 * go-lang.c (go_pkgpath): New static variable.
9 (go_prefix): New static variable.
10 (go_langhook_init): Pass go_pkgpath and go_prefix to
11 go_create_gogo.
12 (go_langhook_handle_option): Handle -fgo-pkgpath. Change
13 -fgo-prefix handling to just set go_prefix.
14 * go-c.h (go_set_prefix): Don't declare.
15 (go_create_gogo): Add pkgpath and prefix to declaration.
16 * go-gcc.cc (Gcc_backend::global_variable): Change unique_prefix
17 to pkgpath. Don't include the package name in the asm name.
18 * gccgo.texi (Invoking gccgo): Document -fgo-pkgpath. Update the
19 docs for -fgo-prefix.
20
21 2012-04-23 Ian Lance Taylor <iant@google.com>
22
23 * go-lang.c (go_langhook_init): Set MPFR precision to 256.
24
25 2012-04-20 Ian Lance Taylor <iant@google.com>
26
27 * lang.opt: Add -fgo-check-divide-zero and
28 -fgo-check-divide-overflow.
29 * gccgo.texi (Invoking gccgo): Document new options.
30
31 2012-04-18 Steven Bosscher <steven@gcc.gnu.org>
32
33 * go-gcc.cc (Gcc_backend::switch_statement): Build SWITCH_EXPR
34 with NULL_TREE type instead of void_type_node.
35
36 2012-03-09 Ian Lance Taylor <iant@google.com>
37
38 * go-gcc.cc (Gcc_backend::assignment_statement): Convert the rhs
39 to the lhs type if necessary.
40
41 2012-03-08 Ian Lance Taylor <iant@google.com>
42
43 * go-gcc.cc (Gcc_backend::init_statement): Don't initialize a
44 zero-sized variable.
45 (go_non_zero_struct): New global variable.
46 (Gcc_backend::non_zero_size_type): New function.
47 (Gcc_backend::global_variable): Don't build an assignment for a
48 zero-sized value.
49 * go-c.h (go_non_zero_struct): Declare.
50 * config-lang.in (gtfiles): Add go-c.h.
51
52 2012-02-29 Ian Lance Taylor <iant@google.com>
53
54 * go-gcc.cc (class Gcc_tree): Add set_tree method.
55 (set_placeholder_pointer_type): When setting to a pointer to
56 error, set to error_mark_node.
57
58 2012-02-23 Richard Guenther <rguenther@suse.de>
59
60 * go-gcc.cc (Gcc_backend::placeholder_pointer_type): Use
61 build_distinct_type_copy.
62
63 2012-02-17 Ian Lance Taylor <iant@google.com>
64
65 * Make-lang.in (go/import.o): Add dependency on $(GO_LEX_H).
66
67 2012-02-17 Ian Lance Taylor <iant@google.com>
68
69 * gospec.c (lang_specific_driver): If linking, and no -o option
70 was used, add one.
71
72 2012-02-14 Ian Lance Taylor <iant@google.com>
73
74 PR go/48411
75 * Make-lang.in (gccgo-cross$(exeext)): New target.
76 (go.all.cross): Depend on gccgo-cross$(exeext) instead of
77 gccgo$(exeext).
78 (go.install-common): Only install GCCGO_TARGET_INSTALL_NAME if
79 gccgo-cross$(exeext) does not exist.
80
81 2012-02-07 Ian Lance Taylor <iant@google.com>
82
83 * gccgo.texi (Function Names): Document //extern instead of
84 __asm__.
85
86 2012-02-01 Jakub Jelinek <jakub@redhat.com>
87
88 PR target/52079
89 * go-lang.c (go_langhook_type_for_mode): For TImode and 64-bit HWI
90 return build_nonstandard_integer_type result if possible.
91
92 2012-01-21 Ian Lance Taylor <iant@google.com>
93
94 * go-gcc.cc (Gcc_backend::type_size): Check for error_mark_node.
95 (Gcc_backend::type_alignment): Likewise.
96 (Gcc_backend::type_field_alignment): Likewise.
97 (Gcc_backend::type_field_offset): Likewise.
98
99 2012-01-20 Ian Lance Taylor <iant@google.com>
100
101 * go-gcc.cc (Gcc_backend::placeholder_struct_type): Permit name to
102 be empty.
103 (Gcc_backend::set_placeholder_struct_type): Likewise.
104
105 2012-01-17 Ian Lance Taylor <iant@google.com>
106
107 * gospec.c (lang_specific_driver): If we see -S without -o, add -o
108 BASE.s rather than -o BASE.o.
109
110 2012-01-11 Ian Lance Taylor <iant@google.com>
111
112 * go-lang.c (go_langhook_init): Initialize void_list_node before
113 calling go_create_gogo.
114
115 2012-01-10 Ian Lance Taylor <iant@google.com>
116
117 * go-gcc.cc (Gcc_backend::type_size): New function.
118 (Gcc_backend::type_alignment): New function.
119 (Gcc_backend::type_field_alignment): New function.
120 (Gcc_backend::type_field_offset): New function.
121 * go-backend.c (go_type_alignment): Remove.
122 * go-c.h (go_type_alignment): Don't declare.
123
124 2011-12-27 Ian Lance Taylor <iant@google.com>
125
126 * go-gcc.cc (Gcc_backend::set_placeholder_struct_type): Use
127 build_distinct_type_copy rather than build_variant_type_copy.
128 (Gcc_backend::set_placeholder_array_type): Likewise.
129 (Gcc_backend::named_type): Add special handling for builtin
130 basic types.
131
132 2011-12-22 Ian Lance Taylor <iant@google.com>
133
134 * go-gcc.cc (Gcc_backend::set_placeholder_pointer_type): Arrange
135 for the type name to have a DECL_ORIGINAL_TYPE as gcc expects.
136 (Gcc_backend::set_placeholder_struct_type): Likewise.
137 (Gcc_backend::set_placeholder_array_type): Likewise.
138 (Gcc_backend::named_type): Set DECL_ORIGINAL_TYPE.
139
140 2011-12-13 Ian Lance Taylor <iant@google.com>
141
142 * go-backend.c: #include "simple-object.h" and "intl.h".
143 (GO_EXPORT_SEGMENT_NAME): Define if not defined.
144 (GO_EXPORT_SECTION_NAME): Likewise.
145 (go_write_export_data): Use GO_EXPORT_SECTION_NAME.
146 (go_read_export_data): New function.
147 * go-c.h (go_read_export_data): Declare.
148
149 2011-11-29 Sanjoy Das <thedigitalangel@gmail.com>
150 Ian Lance Taylor <iant@google.com>
151
152 * go-location.h: New file.
153 * go-linemap.cc: New file.
154 * go-gcc.cc: Change all uses of source_location to Location.
155 * Make-lang.in (GO_OBJS): Add go/go-linemap.o.
156 (GO_LINEMAP_H): New variable.
157 (GO_LEX_H): Use $(GO_LINEMAP_H).
158 (GO_GOGO_H, GO_TYPES_H, GO_IMPORT_H): Likewise.
159 (go/go-linemap.o): New target.
160
161 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
162
163 * Make-lang.in (gospec.o): Pass SHLIB instead of SHLIB_LINK.
164
165 2011-08-24 Roberto Lublinerman <rluble@gmail.com>
166
167 * lang.opt: Add fgo-optimize-.
168 * go-lang.c (go_langhook_handle_option): Handle OPT_fgo_optimize.
169 * go-c.h (go_enable_optimize): Declare.
170 * Make-lang.in (GO_OBJS): Add go/go-optimize.o.
171 (GO_EXPORT_H): Define.
172 (GO_IMPORT_H): Add $(GO_EXPORT_H).
173 (GO_AST_DUMP_H): Define.
174 (go/ast-dump.o, go/statements.o): Use GO_AST_DUMP_H.
175 (go/export.o, go/gogo.o, go/import.o): Use GO_EXPORT_H.
176 (go/types.o): Likewise.
177 (go/expressions.o): Use GO_AST_DUMP_H and GO_EXPORT_H.
178 (go/go-optimize.o): New target.
179
180 2011-08-24 Joseph Myers <joseph@codesourcery.com>
181
182 * Make-lang.in (CFLAGS-go/go-lang.o): New.
183 (go/go-lang.o): Remove explicit compilation rule.
184
185 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
186
187 * Make-lang.in (gccgo$(exeext)): Add $(EXTRA_GCC_LIBS).
188
189 2011-08-02 Roberto Lublinerman <rluble@gmail.com>
190
191 * Make-lang.in (GO_OBJS): Add go/ast-dump.o.
192 (go/ast-dump.o): New target.
193 (go/expressions.o): Depend on go/gofrontend/ast-dump.h.
194 (go/statements.o): Likewise.
195
196 2011-07-06 Richard Guenther <rguenther@suse.de>
197
198 * go-lang.c (go_langhook_init):
199 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
200
201 2011-06-14 Joseph Myers <joseph@codesourcery.com>
202
203 * Make-lang.in (go/go-lang.o, go/go-backend.o): Update
204 dependencies.
205 * go-backend.c: Include common/common-target.h.
206 (go_write_export_data): Use targetm_common.have_named_sections.
207 * go-lang.c: Include common/common-target.h.
208 (go_langhook_init_options_struct): Use
209 targetm_common.supports_split_stack.
210
211 2011-06-13 Ian Lance Taylor <iant@google.com>
212
213 * Make-lang.in (go/expressions.o): Depend on $(GO_RUNTIME_H).
214
215 2011-06-10 Ian Lance Taylor <iant@google.com>
216
217 * go-gcc.cc: Include "toplev.h".
218 (Gcc_backend::immutable_struct): New function.
219 (Gcc_backend::immutable_struct_set_init): New function.
220 (Gcc_backend::immutable_struct_reference): New function.
221 * Make-lang.in (go/go-gcc.o): Depend on toplev.h.
222
223 2011-06-09 Ian Lance Taylor <iant@google.com>
224
225 * go-gcc.cc (Gcc_backend::zero_expression): New function.
226
227 2011-06-07 Richard Guenther <rguenther@suse.de>
228
229 * go-lang.c (go_langhook_init): Do not set
230 size_type_node or call set_sizetype.
231
232 2011-05-27 Ian Lance Taylor <iant@google.com>
233
234 * go-backend.c: Include "output.h".
235 (go_write_export_data): New function.
236 * go-c.h (go_write_export_data): Declare.
237 * Make-lang.in (go/go-backend.o): Depend on output.h.
238 (go/export.o): Depend on $(GO_C_H). Do not depend on
239 $(MACHMODE_H), output.h, or $(TARGET_H).
240
241 2011-05-24 Joseph Myers <joseph@codesourcery.com>
242
243 * Make-lang.in (GCCGO_OBJS): Remove prefix.o.
244 (gccgo$(exeext)): Use libcommon-target.a.
245
246 2011-05-20 Joseph Myers <joseph@codesourcery.com>
247
248 * Make-lang.in (GCCGO_OBJS): Remove intl.o and version.o.
249
250 2011-05-13 Ian Lance Taylor <iant@google.com>
251
252 * go-gcc.cc (Gcc_backend::function_type): When building a struct
253 for multiple results, check that all fields types have a size.
254 (Gcc_backend::placeholder_pointer_type): Permit name to be empty.
255
256 2011-05-12 Ian Lance Taylor <iant@google.com>
257
258 * go-gcc.cc (Gcc_backend::local_variable): Add is_address_taken
259 parameter.
260 (Gcc_backend::parameter_variable): Likewise.
261
262 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
263
264 * go-lang.c (global_bindings_p): Return bool and simplify.
265
266 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
267
268 * go-gcc.cc (Gcc_backend::switch_statement): Call build_case_label.
269
270 2011-05-04 Ian Lance Taylor <iant@google.com>
271
272 * go-gcc.cc (Gcc_backend::struct_type): Call fill_in_struct.
273 (Gcc_backend::fill_in_struct): New function.
274 (Gcc_backend::array_type): Implement.
275 (Gcc_backend::fill_in_array): New function.
276 (Gcc_backend::placeholder_pointer_type): New function.
277 (Gcc_backend::set_placeholder_pointer_type): New function.
278 (Gcc_backend::set_placeholder_function_type): New function.
279 (Gcc_backend::placeholder_struct_type): New function.
280 (Gcc_backend::set_placeholder_struct_type): New function.
281 (Gcc_backend::placeholder_array_type): New function.
282 (Gcc_backend::set_placeholder_array_type): New function.
283 (Gcc_backend::named_type): New function.
284 (Gcc_backend::circular_pointer_type): New function.
285 (Gcc_backend::is_circular_pointer_type): New function.
286
287 2011-04-26 Ian Lance Taylor <iant@google.com>
288
289 * go-gcc.cc (Gcc_backend::struct_type): Implement.
290
291 2011-04-25 Ian Lance Taylor <iant@google.com>
292
293 * go-gcc.cc (Gcc_backend::error_type): Implement.
294 (Gcc_backend::string_type): Remove.
295 (Gcc_backend::function_type): Change signature and implement.
296 (Gcc_backend::struct_type): Change signature.
297 (Gcc_backend::slice_type, Gcc_backend::map_type): Remove.
298 (Gcc_backend::channel_type, Gcc_backend::interface_type): Remove.
299 (Gcc_backend::pointer_type): Check for error.
300 * Make-lang.in (go/types.o): Depend on go/gofrontend/backend.h.
301
302 2011-04-25 Evan Shaw <edsrzf@gmail.com>
303
304 * go-gcc.c (class Gcc_tree): Make get_tree const.
305 (Gcc_backend::void_type): Implement.
306 (Gcc_backend::bool_type): Implement.
307 (Gcc_backend::integer_type): Implement.
308 (Gcc_backend::float_type): Implement.
309 (Gcc_backend::complex_type): New function.
310 (Gcc_backend::pointer_type): New function.
311 (Gcc_backend::make_type): New function.
312 (type_to_tree): New function.
313
314 2011-04-21 Ian Lance Taylor <iant@google.com>
315
316 * go-system.h (go_assert, go_unreachable): Define.
317
318 2011-04-19 Ian Lance Taylor <iant@google.com>
319
320 * go-system.h: Include "intl.h".
321 * Make-lang.in (GO_SYSTEM_H): Add intl.h.
322 (go/statements.o): Remove dependencies on intl.h $(TREE_H)
323 $(GIMPLE_H) convert.h tree-iterator.h $(TREE_FLOW_H) $(REAL_H).
324
325 2011-04-19 Ian Lance Taylor <iant@google.com>
326
327 * go-gcc.cc (Gcc_backend::temporary_variable): New function.
328
329 2011-04-19 Ian Lance Taylor <iant@google.com>
330
331 * go-gcc.cc (class Bblock): Define.
332 (Gcc_backend::if_statement): Change then_block and else_block to
333 Bblock*.
334 (Gcc_backend::block): New function.
335 (Gcc_backend::block_add_statements): New function.
336 (Gcc_backend::block_statement): New function.
337 (tree_to_block, block_to_tree): New functions.
338
339 2011-04-18 Ian Lance Taylor <iant@google.com>
340
341 * go-gcc.cc: Include "go-c.h".
342 (class Bvariable): Define.
343 (Gcc_backend::init_statement): New function.
344 (Gcc_backend::global_variable): New function.
345 (Gcc_backend::global_variable_set_init): New function.
346 (Gcc_backend::local_variable): New function.
347 (Gcc_backend::parameter_variable): New function.
348 (tree_to_type, var_to_tree): New functions.
349 * Make-lang.in (go/go-gcc.o): Depend on $(GO_C_H).
350 * (go/gogo-tree.o): Depend on go/gofrontend/backend.h.
351
352 2011-04-15 Ian Lance Taylor <iant@google.com>
353
354 * go-gcc.cc (Gcc_backend::compound_statement): New function.
355 (Gcc_backend::assignment_statement): Use error_statement.
356 (Gcc_backend::return_statement): Likewise.
357 (Gcc_backend::if_statement): Likewise.
358 (Gcc_backend::switch_statement): Likewise.
359 (Gcc_backend::statement_list): Likewise.
360
361 2011-04-14 Ian Lance Taylor <iant@google.com>
362
363 * go-gcc.cc (Backend::error_statement): New function.
364
365 2011-04-13 Ian Lance Taylor <iant@google.com>
366
367 * Make-lang.in (go/gogo-tree.o): depend on $(GO_RUNTIME_H).
368
369 2011-04-13 Ian Lance Taylor <iant@google.com>
370
371 * Make-lang.in (GO_OBJS): Add go/runtime.o.
372 (GO_RUNTIME_H): New variable.
373 (go/runtime.o): New target.
374 (go/gogo.o): Depend on $(GO_RUNTIME_H).
375 (go/statements.o): Likewise.
376
377 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
378
379 * go-lang.c (union lang_tree_node): Check for TS_COMMON before
380 calling TREE_CHAIN.
381
382 2011-04-06 Ian Lance Taylor <iant@google.com>
383
384 * go-gcc.cc (if_statement): Use build3_loc.
385 (Gcc_backend::switch_statement): New function.
386 (Gcc_backend::statement_list): New function.
387
388 2011-04-06 Ian Lance Taylor <iant@google.com>
389
390 * go-gcc.cc (Gcc_backend::if_statement): New function.
391 (tree_to_stat): New function.
392 (expr_to_tree): Renamed from expression_to_tree.
393 (stat_to_tree): Renamed from statement_to_tree.
394
395 2011-04-06 Ian Lance Taylor <iant@google.com>
396
397 * go-gcc.cc (Gcc_backend::expression_statement): New function.
398
399 2011-04-04 Ian Lance Taylor <iant@google.com>
400
401 * go-gcc.c (class Blabel): Define.
402 (Gcc_backend::make_expression): New function.
403 (get_identifier_from_string): New function.
404 (Gcc_backend::label): New function.
405 (Gcc_backend::label_definition_statement): New function.
406 (Gcc_backend::goto_statement): New function.
407 (Gcc_backend::label_address): New function.
408 (expression_to_tree): New function.
409 * Make-lang.in (go/expressions.o): Depend on
410 go/gofrontend/backend.h.
411 (go/gogo.o): Likewise.
412
413 2011-04-04 Ian Lance Taylor <iant@google.com>
414
415 * go-gcc.cc: #include "tree-iterator.h", "gimple.h", and "gogo.h".
416 (class Bfunction): Define.
417 (Gcc_backend::assignment_statement): Rename from assignment.
418 Check for errors.
419 (Gcc_backend::return_statement): New function.
420 (tree_to_function): New function.
421 * Make-lang.in (go/go-gcc.o): Depend on tree-iterator.h,
422 $(GIMPLE_H), and $(GO_GOGO_H).
423
424 2011-04-03 Ian Lance Taylor <iant@google.com>
425
426 * go-gcc.cc: New file.
427 * Make-lang.in (GO_OBJS): Add go/go-gcc.o.
428 (go/go-gcc.o): New target.
429 (go/go.o): Depend on go/gofrontend/backend.h.
430 (go/statements.o): Likewise.
431
432 2011-02-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
433
434 * gccgo.texi (Top, Import and Export): Fix a typo and a markup nit.
435
436 2011-02-08 Ian Lance Taylor <iant@google.com>
437
438 * go-lang.c (go_langhook_init_options_struct): Set
439 frontend_set_flag_errno_math. Don't set x_flag_trapping_math.
440
441 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
442
443 * gospec.c (lang_specific_driver) [HAVE_LD_STATIC_DYNAMIC] Use
444 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
445
446 2011-01-21 Ian Lance Taylor <iant@google.com>
447
448 * go-lang.c (go_langhook_init): Omit float_type_size when calling
449 go_create_gogo.
450 * go-c.h: Update declaration of go_create_gogo.
451
452 2011-01-13 Ian Lance Taylor <iant@google.com>
453
454 * go-backend.c: Include "rtl.h" and "target.h".
455 (go_imported_unsafe): New function.
456 * go-c.h (go_imported_unsafe): Declare.
457 * Make-lang.in (go/go-backend.o): Depend on $(RTL_H).
458 (go/gogo-tree.o): Remove dependency on $(RTL_H).
459 (go/unsafe.o): Depend on $(GO_C_H).
460
461 2010-12-31 Joern Rennecke <amylaar@spamcop.net>
462
463 PR go/47113
464 * go-backend.c: (go_field_alignment): Add ATTRIBUTE_UNUSED to
465 variable ‘field’ .
466
467 2010-12-21 Ian Lance Taylor <iant@google.com>
468
469 * Make-lang.in (check-go): Remove.
470 (lang_checks_parallelized): Add check-go.
471 (check_go_parallelize): Set.
472
473 2010-12-13 Ian Lance Taylor <iant@google.com>
474
475 * gospec.c (lang_specific_driver): Add a -o option if not linking
476 and there is no -o option already.
477
478 2010-12-07 Ian Lance Taylor <iant@google.com>
479
480 PR tree-optimization/46805
481 PR tree-optimization/46833
482 * go-lang.c (go_langhook_type_for_mode): Handle vector modes.
483
484 2010-12-06 Ian Lance Taylor <iant@google.com>
485
486 PR other/46789
487 PR bootstrap/46812
488 * go-lang.c (go_char_p): Define type and vectors.
489 (go_search_dirs): New static variable.
490 (go_langhook_handle_option): Use version and version/machine
491 directories for -L.
492 (go_langhook_post_options): Add non-specific -L paths.
493 * Make-lang.in (go/go-lang.o): Define DEFAULT_TARGET_VERSION and
494 DEFAULT_TARGET_MACHINE when compiling.
495 * gccgo.texi (Invoking gccgo): Only document -L for linking.
496 (Import and Export): Don't mention -L for finding import files.
497
498 2010-12-03 Ian Lance Taylor <iant@google.com>
499
500 PR bootstrap/46776
501 * go-backend.c: New file.
502 * go-c.h (go_type_alignment): Declare.
503 (go_field_alignment, go_trampoline_info): Declare.
504 * Make-lang.in (GO_OBJS): Add go/go-backend.o.
505 (go/go-backend.o): New target.
506 (go/go-lang.o): Make dependencies match source file.
507 (go/expressions.o): Don't depend on $(TM_H) $(TM_P_H).
508 (go/gogo-tree.o): Don't depend on $(TM_H).
509
510 2010-12-03 Ian Lance Taylor <iant@google.com>
511
512 * config-lang.in (build_by_default): Set to no.
513
514 2010-12-02 Ian Lance Taylor <iant@google.com>
515
516 Go frontend added to gcc repository.