292 | | diff -Naur gcc-4.4.0.orig/gcc/ChangeLog gcc-4.4.0/gcc/ChangeLog |
293 | | --- gcc-4.4.0.orig/gcc/ChangeLog 2009-04-21 01:44:59.000000000 -0700 |
294 | | +++ gcc-4.4.0/gcc/ChangeLog 2009-04-28 21:57:17.000000000 -0700 |
295 | | @@ -1,3 +1,143 @@ |
296 | | +2009-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
297 | | + |
298 | | + * toplev.c (print_version): Update GMP version string calculation. |
299 | | + |
300 | | +2009-04-28 H.J. Lu <hongjiu.lu@intel.com> |
301 | | + |
302 | | + Backport from mainline: |
303 | | + 2009-04-27 H.J. Lu <hongjiu.lu@intel.com> |
304 | | + |
305 | | + PR target/39903 |
306 | | + * config/i386/i386.c (construct_container): Don't call |
307 | | + gen_reg_or_parallel with BLKmode on X86_64_SSE_CLASS, |
308 | | + X86_64_SSESF_CLASS and X86_64_SSEDF_CLASS. |
309 | | + |
310 | | +2009-04-27 Jakub Jelinek <jakub@redhat.com> |
311 | | + |
312 | | + PR rtl-optimization/39794 |
313 | | + * alias.c (canon_true_dependence): Add x_addr argument. |
314 | | + * rtl.h (canon_true_dependence): Adjust prototype. |
315 | | + * cse.c (check_dependence): Adjust canon_true_dependence callers. |
316 | | + * cselib.c (cselib_invalidate_mem): Likewise. |
317 | | + * gcse.c (compute_transp): Likewise. |
318 | | + * dse.c (scan_reads_nospill): Likewise. |
319 | | + (record_store, check_mem_read_rtx): Likewise. For non-const-or-frame |
320 | | + addresses pass base->val_rtx as mem_addr, for const-or-frame addresses |
321 | | + canon_base_addr of the group, plus optional offset. |
322 | | + (struct group_info): Rename canon_base_mem to |
323 | | + canon_base_addr. |
324 | | + (get_group_info): Set canon_base_addr to canon_rtx of base, not |
325 | | + canon_rtx of base_mem. |
326 | | + |
327 | | +2009-04-26 Jakub Jelinek <jakub@redhat.com> |
328 | | + |
329 | | + PR inline-asm/39543 |
330 | | + * fwprop.c (forward_propagate_asm): New function. |
331 | | + (forward_propagate_and_simplify): Propagate also into __asm, if it |
332 | | + doesn't increase the number of referenced registers. |
333 | | + |
334 | | + PR c/39889 |
335 | | + * stmt.c (warn_if_unused_value): Look through NON_LVALUE_EXPR. |
336 | | + |
337 | | +2009-04-24 Andreas Krebbel <krebbel1@de.ibm.com> |
338 | | + |
339 | | + * config/s390/constraints.md ('I', 'J'): Fix condition. |
340 | | + |
341 | | +2009-04-24 Paolo Bonzini <bonzini@gnu.org> |
342 | | + |
343 | | + PR middle-end/39867 |
344 | | + * fold-const.c (fold_cond_expr_with_comparison): When folding |
345 | | + > and >= to MAX, make sure the MAX uses the same type as the |
346 | | + comparison's operands. |
347 | | + |
348 | | +2009-04-23 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> |
349 | | + |
350 | | + * config/spu/spu-builtins.h: Delete file. |
351 | | + |
352 | | + * config/spu/spu.h (enum spu_builtin_type): Move here from |
353 | | + spu-builtins.h. |
354 | | + (struct spu_builtin_description): Likewise. Add GTY marker. |
355 | | + Do not use enum spu_function_code or enum insn_code. |
356 | | + (spu_builtins): Add extern declaration. |
357 | | + |
358 | | + * config/spu/spu.c: Do not include "spu-builtins.h". |
359 | | + (enum spu_function_code, enum spu_builtin_type_index, |
360 | | + V16QI_type_node, V8HI_type_node, V4SI_type_node, V2DI_type_node, |
361 | | + V4SF_type_node, V2DF_type_node, unsigned_V16QI_type_node, |
362 | | + unsigned_V8HI_type_node, unsigned_V4SI_type_node, |
363 | | + unsigned_V2DI_type_node): Move here from spu-builtins.h. |
364 | | + (spu_builtin_types): Make static. Add GTY marker. |
365 | | + (spu_builtins): Add extern declaration with GTY marker. |
366 | | + Include "gt-spu.h". |
367 | | + |
368 | | + * config/spu/spu-c.c: Do not include "spu-builtins.h". |
369 | | + (spu_resolve_overloaded_builtin): Do not use spu_function_code. |
370 | | + Check programmatically whether all parameters are scalar. |
371 | | + |
372 | | + * config/spu/t-spu-elf (spu.o, spu-c.o): Update dependencies. |
373 | | + |
374 | | +2009-04-22 Jing Yu <jingyu@google.com> |
375 | | + |
376 | | + PR testsuite/39781 |
377 | | + * config/arm/arm.h: Define HANDLE_PRAGMA_PACK_PUSH_POP. |
378 | | + |
379 | | +2009-04-22 Eric Botcazou <ebotcazou@adacore.com> |
380 | | + |
381 | | + Backport from mainline: |
382 | | + 2009-04-17 Eric Botcazou <ebotcazou@adacore.com> |
383 | | + * dbxout.c (dbxout_block): Reinstate test on TREE_USED. |
384 | | + * tree-ssa-live.c (remove_unused_scope_block_p): Update TREE_USED bit. |
385 | | + |
386 | | +2009-04-22 Jakub Jelinek <jakub@redhat.com> |
387 | | + |
388 | | + * alias.c (find_base_term): Move around LO_SUM case, so that |
389 | | + CONST falls through into PLUS/MINUS handling. |
390 | | + |
391 | | + PR c/39855 |
392 | | + * fold-const.c (fold_binary) <case LSHIFT_EXPR>: When optimizing |
393 | | + into 0, use omit_one_operand. |
394 | | + |
395 | | +2009-04-22 Vladimir Makarov <vmakarov@redhat.com> |
396 | | + |
397 | | + PR rtl-optimization/39762 |
398 | | + * ira-int.h (ira_register_move_cost, ira_may_move_in_cost, |
399 | | + ira_may_move_out_cost): Add comments about way of their usage. |
400 | | + (ira_get_register_move_cost, ira_get_may_move_cost): New functions. |
401 | | + |
402 | | + * ira-conflicts.c (process_regs_for_copy): Use function |
403 | | + ira_get_register_move_cost instead of global |
404 | | + ira_register_move_cost. |
405 | | + |
406 | | + * ira-color.c (update_copy_costs, calculate_allocno_spill_cost, |
407 | | + color_pass, move_spill_restore, update_curr_costs): Ditto. |
408 | | + |
409 | | + * ira-lives.c (process_single_reg_class_operands): Ditto. |
410 | | + |
411 | | + * ira-emit.c (emit_move_list): Ditto. |
412 | | + |
413 | | + * ira-costs.c (copy_cost): Don't call ira_init_register_move_cost. |
414 | | + (record_reg_classes): Ditto. Use functions |
415 | | + ira_get_register_move_cost and ira_get_may_move_cost instead of |
416 | | + global vars ira_register_move_cost, ira_may_move_out_cost and |
417 | | + ira_may_move_in_cost. |
418 | | + (record_address_regs): Don't call ira_init_register_move_cost. |
419 | | + Use function ira_get_may_move_cost instead of global |
420 | | + ira_may_move_in_cost. |
421 | | + (process_bb_node_for_hard_reg_moves): Use function |
422 | | + ira_get_register_move_cost instead of global ira_register_move_cost. |
423 | | + (ira_costs): Don't call ira_init_register_move_cost. |
424 | | + |
425 | | +2009-04-22 Richard Guenther <rguenther@suse.de> |
426 | | + |
427 | | + PR tree-optimization/39824 |
428 | | + * tree-ssa-ccp.c (fold_const_aggregate_ref): For INDIRECT_REFs |
429 | | + make sure the types are compatible. |
430 | | + |
431 | | +2009-04-21 Jakub Jelinek <jakub@redhat.com> |
432 | | + |
433 | | + * BASE-VER: Set to 4.4.1. |
434 | | + * DEV-PHASE: Set to prerelease. |
435 | | + |
436 | | 2009-04-21 Release Manager |
437 | | |
438 | | * GCC 4.4.0 released. |
| 276 | diff -Naur gcc-4.4.0.orig/gcc/builtins.c gcc-4.4.0/gcc/builtins.c |
| 277 | --- gcc-4.4.0.orig/gcc/builtins.c 2009-03-30 10:42:27.000000000 -0700 |
| 278 | +++ gcc-4.4.0/gcc/builtins.c 2009-05-29 08:47:31.000000000 -0700 |
| 279 | @@ -4176,7 +4176,7 @@ |
| 280 | |
| 281 | arg1_rtx = get_memory_rtx (arg1, len); |
| 282 | arg2_rtx = get_memory_rtx (arg2, len); |
| 283 | - arg3_rtx = expand_normal (len); |
| 284 | + arg3_rtx = expand_normal (fold_convert (sizetype, len)); |
| 285 | |
| 286 | /* Set MEM_SIZE as appropriate. */ |
| 287 | if (GET_CODE (arg3_rtx) == CONST_INT) |
| 288 | diff -Naur gcc-4.4.0.orig/gcc/cfgrtl.c gcc-4.4.0/gcc/cfgrtl.c |
| 289 | --- gcc-4.4.0.orig/gcc/cfgrtl.c 2008-12-12 13:16:09.000000000 -0800 |
| 290 | +++ gcc-4.4.0/gcc/cfgrtl.c 2009-05-21 16:17:37.000000000 -0700 |
| 291 | @@ -53,6 +53,7 @@ |
| 292 | #include "toplev.h" |
| 293 | #include "tm_p.h" |
| 294 | #include "obstack.h" |
| 295 | +#include "insn-attr.h" |
| 296 | #include "insn-config.h" |
| 297 | #include "cfglayout.h" |
| 298 | #include "expr.h" |
| 299 | @@ -427,13 +428,27 @@ |
| 300 | return 0; |
| 301 | } |
| 302 | |
| 303 | +static unsigned int |
| 304 | +rest_of_pass_free_cfg (void) |
| 305 | +{ |
| 306 | +#ifdef DELAY_SLOTS |
| 307 | + /* The resource.c machinery uses DF but the CFG isn't guaranteed to be |
| 308 | + valid at that point so it would be too late to call df_analyze. */ |
| 309 | + if (optimize > 0 && flag_delayed_branch) |
| 310 | + df_analyze (); |
| 311 | +#endif |
| 312 | + |
| 313 | + free_bb_for_insn (); |
| 314 | + return 0; |
| 315 | +} |
| 316 | + |
| 317 | struct rtl_opt_pass pass_free_cfg = |
| 318 | { |
| 319 | { |
| 320 | RTL_PASS, |
| 321 | NULL, /* name */ |
| 322 | NULL, /* gate */ |
| 323 | - free_bb_for_insn, /* execute */ |
| 324 | + rest_of_pass_free_cfg, /* execute */ |
| 325 | NULL, /* sub */ |
| 326 | NULL, /* next */ |
| 327 | 0, /* static_pass_number */ |
| 328 | diff -Naur gcc-4.4.0.orig/gcc/config/arm/arm.c gcc-4.4.0/gcc/config/arm/arm.c |
| 329 | --- gcc-4.4.0.orig/gcc/config/arm/arm.c 2009-02-24 23:18:01.000000000 -0800 |
| 330 | +++ gcc-4.4.0/gcc/config/arm/arm.c 2009-06-02 00:18:16.000000000 -0700 |
| 331 | @@ -16883,7 +16883,7 @@ |
| 332 | |
| 333 | if (push && pushed_words && dwarf2out_do_frame ()) |
| 334 | { |
| 335 | - char *l = dwarf2out_cfi_label (); |
| 336 | + char *l = dwarf2out_cfi_label (false); |
| 337 | int pushed_mask = real_regs; |
| 338 | |
| 339 | *cfa_offset += pushed_words * 4; |
| 340 | @@ -17781,7 +17781,7 @@ |
| 341 | the stack pointer. */ |
| 342 | if (dwarf2out_do_frame ()) |
| 343 | { |
| 344 | - char *l = dwarf2out_cfi_label (); |
| 345 | + char *l = dwarf2out_cfi_label (false); |
| 346 | |
| 347 | cfa_offset = cfa_offset + crtl->args.pretend_args_size; |
| 348 | dwarf2out_def_cfa (l, SP_REGNUM, cfa_offset); |
| 349 | @@ -17830,7 +17830,7 @@ |
| 350 | |
| 351 | if (dwarf2out_do_frame ()) |
| 352 | { |
| 353 | - char *l = dwarf2out_cfi_label (); |
| 354 | + char *l = dwarf2out_cfi_label (false); |
| 355 | |
| 356 | cfa_offset = cfa_offset + 16; |
| 357 | dwarf2out_def_cfa (l, SP_REGNUM, cfa_offset); |
| 373 | diff -Naur gcc-4.4.0.orig/gcc/config/arm/arm.md gcc-4.4.0/gcc/config/arm/arm.md |
| 374 | --- gcc-4.4.0.orig/gcc/config/arm/arm.md 2009-04-04 05:25:06.000000000 -0700 |
| 375 | +++ gcc-4.4.0/gcc/config/arm/arm.md 2009-05-16 06:28:27.000000000 -0700 |
| 376 | @@ -8214,7 +8214,7 @@ |
| 377 | |
| 378 | (define_insn "cstoresi_nltu_thumb1" |
| 379 | [(set (match_operand:SI 0 "s_register_operand" "=l,l") |
| 380 | - (neg:SI (gtu:SI (match_operand:SI 1 "s_register_operand" "l,*h") |
| 381 | + (neg:SI (ltu:SI (match_operand:SI 1 "s_register_operand" "l,*h") |
| 382 | (match_operand:SI 2 "thumb1_cmp_operand" "lI*h,*r"))))] |
| 383 | "TARGET_THUMB1" |
| 384 | "cmp\\t%1, %2\;sbc\\t%0, %0, %0" |
| 385 | diff -Naur gcc-4.4.0.orig/gcc/config/i386/driver-i386.c gcc-4.4.0/gcc/config/i386/driver-i386.c |
| 386 | --- gcc-4.4.0.orig/gcc/config/i386/driver-i386.c 2008-11-04 05:29:43.000000000 -0800 |
| 387 | +++ gcc-4.4.0/gcc/config/i386/driver-i386.c 2009-05-27 07:54:00.000000000 -0700 |
| 388 | @@ -336,7 +336,11 @@ |
| 389 | enum vendor_signatures |
| 390 | { |
| 391 | SIG_INTEL = 0x756e6547 /* Genu */, |
| 392 | - SIG_AMD = 0x68747541 /* Auth */, |
| 393 | + SIG_AMD = 0x68747541 /* Auth */ |
| 394 | +}; |
| 395 | + |
| 396 | +enum processor_signatures |
| 397 | +{ |
| 398 | SIG_GEODE = 0x646f6547 /* Geod */ |
| 399 | }; |
| 400 | |
| 401 | @@ -374,6 +378,9 @@ |
| 402 | /* Extended features */ |
| 403 | unsigned int has_lahf_lm = 0, has_sse4a = 0; |
| 404 | unsigned int has_longmode = 0, has_3dnowp = 0, has_3dnow = 0; |
| 405 | + unsigned int has_sse4_1 = 0, has_sse4_2 = 0; |
| 406 | + unsigned int has_popcnt = 0, has_aes = 0, has_avx = 0; |
| 407 | + unsigned int has_pclmul = 0; |
| 408 | |
| 409 | bool arch; |
| 410 | |
| 411 | @@ -397,7 +404,13 @@ |
| 412 | |
| 413 | has_sse3 = ecx & bit_SSE3; |
| 414 | has_ssse3 = ecx & bit_SSSE3; |
| 415 | + has_sse4_1 = ecx & bit_SSE4_1; |
| 416 | + has_sse4_2 = ecx & bit_SSE4_2; |
| 417 | + has_avx = ecx & bit_AVX; |
| 418 | has_cmpxchg16b = ecx & bit_CMPXCHG16B; |
| 419 | + has_popcnt = ecx & bit_POPCNT; |
| 420 | + has_aes = ecx & bit_AES; |
| 421 | + has_pclmul = ecx & bit_PCLMUL; |
| 422 | |
| 423 | has_cmpxchg8b = edx & bit_CMPXCHG8B; |
| 424 | has_cmov = edx & bit_CMOV; |
| 425 | @@ -433,19 +446,27 @@ |
| 426 | |
| 427 | if (vendor == SIG_AMD) |
| 428 | { |
| 429 | - processor = PROCESSOR_PENTIUM; |
| 430 | + unsigned int name; |
| 431 | |
| 432 | - if (has_mmx) |
| 433 | - processor = PROCESSOR_K6; |
| 434 | - if (has_3dnowp) |
| 435 | - processor = PROCESSOR_ATHLON; |
| 436 | - if (has_sse2 || has_longmode) |
| 437 | - processor = PROCESSOR_K8; |
| 438 | - if (has_sse4a) |
| 439 | + /* Detect geode processor by its processor signature. */ |
| 440 | + if (ext_level > 0x80000001) |
| 441 | + __cpuid (0x80000002, name, ebx, ecx, edx); |
| 442 | + else |
| 443 | + name = 0; |
| 444 | + |
| 445 | + if (name == SIG_GEODE) |
| 446 | + processor = PROCESSOR_GEODE; |
| 447 | + else if (has_sse4a) |
| 448 | processor = PROCESSOR_AMDFAM10; |
| 449 | + else if (has_sse2 || has_longmode) |
| 450 | + processor = PROCESSOR_K8; |
| 451 | + else if (has_3dnowp) |
| 452 | + processor = PROCESSOR_ATHLON; |
| 453 | + else if (has_mmx) |
| 454 | + processor = PROCESSOR_K6; |
| 455 | + else |
| 456 | + processor = PROCESSOR_PENTIUM; |
| 457 | } |
| 458 | - else if (vendor == SIG_GEODE) |
| 459 | - processor = PROCESSOR_GEODE; |
| 460 | else |
| 461 | { |
| 462 | switch (family) |
| 463 | @@ -576,6 +597,18 @@ |
| 464 | options = concat (options, "-mcx16 ", NULL); |
| 465 | if (has_lahf_lm) |
| 466 | options = concat (options, "-msahf ", NULL); |
| 467 | + if (has_aes) |
| 468 | + options = concat (options, "-maes ", NULL); |
| 469 | + if (has_pclmul) |
| 470 | + options = concat (options, "-mpclmul ", NULL); |
| 471 | + if (has_popcnt) |
| 472 | + options = concat (options, "-mpopcnt ", NULL); |
| 473 | + if (has_avx) |
| 474 | + options = concat (options, "-mavx ", NULL); |
| 475 | + else if (has_sse4_2) |
| 476 | + options = concat (options, "-msse4.2 ", NULL); |
| 477 | + else if (has_sse4_1) |
| 478 | + options = concat (options, "-msse4.1 ", NULL); |
| 479 | } |
| 480 | |
| 481 | done: |
| 497 | @@ -7301,10 +7304,12 @@ |
| 498 | cfun->machine->accesses_prev_frame = 1; |
| 499 | } |
| 500 | |
| 501 | |
| 502 | -#if (defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0)) || TARGET_MACHO |
| 503 | -# define USE_HIDDEN_LINKONCE 1 |
| 504 | -#else |
| 505 | -# define USE_HIDDEN_LINKONCE 0 |
| 506 | +#ifndef USE_HIDDEN_LINKONCE |
| 507 | +# if (defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0)) || TARGET_MACHO |
| 508 | +# define USE_HIDDEN_LINKONCE 1 |
| 509 | +# else |
| 510 | +# define USE_HIDDEN_LINKONCE 0 |
| 511 | +# endif |
| 512 | #endif |
| 513 | |
| 514 | static int pic_labels_used; |
| 515 | diff -Naur gcc-4.4.0.orig/gcc/config/i386/linux.h gcc-4.4.0/gcc/config/i386/linux.h |
| 516 | --- gcc-4.4.0.orig/gcc/config/i386/linux.h 2009-02-20 07:20:38.000000000 -0800 |
| 517 | +++ gcc-4.4.0/gcc/config/i386/linux.h 2009-05-21 06:21:30.000000000 -0700 |
| 518 | @@ -153,7 +153,9 @@ |
| 519 | fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ |
| 520 | /* Make sure that we have at least 8 byte alignment if > 8 byte \ |
| 521 | alignment is preferred. */ \ |
| 522 | - if ((LOG) > 3 && (1 << (LOG)) > ((MAX_SKIP) + 1)) \ |
| 523 | + if ((LOG) > 3 \ |
| 524 | + && (1 << (LOG)) > ((MAX_SKIP) + 1) \ |
| 525 | + && (MAX_SKIP) >= 7) \ |
| 526 | fprintf ((FILE), "\t.p2align 3\n"); \ |
| 527 | } \ |
| 528 | } \ |
| 529 | diff -Naur gcc-4.4.0.orig/gcc/config/i386/sol2.h gcc-4.4.0/gcc/config/i386/sol2.h |
| 530 | --- gcc-4.4.0.orig/gcc/config/i386/sol2.h 2008-09-09 09:17:37.000000000 -0700 |
| 531 | +++ gcc-4.4.0/gcc/config/i386/sol2.h 2009-05-25 05:13:38.000000000 -0700 |
| 532 | @@ -1,6 +1,6 @@ |
| 533 | /* Target definitions for GCC for Intel 80386 running Solaris 2 |
| 534 | Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, |
| 535 | - 2004, 2007, 2008 Free Software Foundation, Inc. |
| 536 | + 2004, 2007, 2008, 2009 Free Software Foundation, Inc. |
| 537 | Contributed by Fred Fish (fnf@cygnus.com). |
| 538 | |
| 539 | This file is part of GCC. |
| 540 | @@ -112,3 +112,9 @@ |
| 541 | /* We do not need NT_VERSION notes. */ |
| 542 | #undef X86_FILE_START_VERSION_DIRECTIVE |
| 543 | #define X86_FILE_START_VERSION_DIRECTIVE false |
| 544 | + |
| 545 | +/* Only recent versions of Solaris 11 ld properly support hidden .gnu.linkonce |
| 546 | + sections, so don't use them. */ |
| 547 | +#ifndef TARGET_GNU_LD |
| 548 | +#define USE_HIDDEN_LINKONCE 0 |
| 549 | +#endif |
| 550 | diff -Naur gcc-4.4.0.orig/gcc/config/i386/sse.md gcc-4.4.0/gcc/config/i386/sse.md |
| 551 | --- gcc-4.4.0.orig/gcc/config/i386/sse.md 2009-03-12 10:43:14.000000000 -0700 |
| 552 | +++ gcc-4.4.0/gcc/config/i386/sse.md 2009-05-06 06:20:41.000000000 -0700 |
| 553 | @@ -978,7 +978,7 @@ |
| 554 | (match_operand:AVXMODEF2P 2 "nonimmediate_operand" "xm")))] |
| 555 | "AVX_VEC_FLOAT_MODE_P (<MODE>mode) && flag_finite_math_only |
| 556 | && ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)" |
| 557 | - "v<maxminfprefix>p<ssemodesuffixf2c>\t{%2, %1, %0|%0, %1, %2}" |
| 558 | + "v<maxminfprefix>p<avxmodesuffixf2c>\t{%2, %1, %0|%0, %1, %2}" |
| 559 | [(set_attr "type" "sseadd") |
| 560 | (set_attr "prefix" "vex") |
| 561 | (set_attr "mode" "<MODE>")]) |
| 562 | diff -Naur gcc-4.4.0.orig/gcc/config/i386/x86-64.h gcc-4.4.0/gcc/config/i386/x86-64.h |
| 563 | --- gcc-4.4.0.orig/gcc/config/i386/x86-64.h 2009-04-09 16:23:07.000000000 -0700 |
| 564 | +++ gcc-4.4.0/gcc/config/i386/x86-64.h 2009-05-21 06:21:30.000000000 -0700 |
| 565 | @@ -74,7 +74,9 @@ |
| 566 | fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ |
| 567 | /* Make sure that we have at least 8 byte alignment if > 8 byte \ |
| 568 | alignment is preferred. */ \ |
| 569 | - if ((LOG) > 3 && (1 << (LOG)) > ((MAX_SKIP) + 1)) \ |
| 570 | + if ((LOG) > 3 \ |
| 571 | + && (1 << (LOG)) > ((MAX_SKIP) + 1) \ |
| 572 | + && (MAX_SKIP) >= 7) \ |
| 573 | fprintf ((FILE), "\t.p2align 3\n"); \ |
| 574 | } \ |
| 575 | } \ |
| 576 | diff -Naur gcc-4.4.0.orig/gcc/config/m32c/m32c.c gcc-4.4.0/gcc/config/m32c/m32c.c |
| 577 | --- gcc-4.4.0.orig/gcc/config/m32c/m32c.c 2009-02-20 07:20:38.000000000 -0800 |
| 578 | +++ gcc-4.4.0/gcc/config/m32c/m32c.c 2009-05-04 16:53:28.000000000 -0700 |
| 579 | @@ -417,6 +417,9 @@ |
| 580 | } |
| 581 | else |
| 582 | target_memregs = 16; |
| 583 | + |
| 584 | + if (TARGET_A24) |
| 585 | + flag_ivopts = 0; |
| 586 | } |
| 587 | |
| 588 | /* Defining data structures for per-function information */ |
| 589 | @@ -2043,6 +2046,31 @@ |
| 590 | return 1; |
| 591 | } |
| 592 | |
| 593 | + /* If we see an RTX like (subreg:PSI (reg:SI ...)) we need to reload |
| 594 | + the subreg. We need to check for PLUS and non-PLUS cases. */ |
| 595 | + |
| 596 | + if (GET_CODE (*x) == SUBREG |
| 597 | + && GET_MODE (XEXP (*x, 0)) == SImode) |
| 598 | + { |
| 599 | + if (type == RELOAD_OTHER) |
| 600 | + type = RELOAD_FOR_OTHER_ADDRESS; |
| 601 | + push_reload (*x, NULL_RTX, x, NULL, |
| 602 | + A_REGS, Pmode, VOIDmode, 0, 0, opnum, |
| 603 | + type); |
| 604 | + return 1; |
| 605 | + } |
| 606 | + if (GET_CODE (*x) == PLUS |
| 607 | + && GET_CODE (XEXP (*x, 0)) == SUBREG |
| 608 | + && GET_MODE (XEXP (XEXP (*x, 0), 0)) == SImode) |
| 609 | + { |
| 610 | + if (type == RELOAD_OTHER) |
| 611 | + type = RELOAD_FOR_OTHER_ADDRESS; |
| 612 | + push_reload (XEXP (*x, 0), NULL_RTX, &(XEXP (*x, 0)), NULL, |
| 613 | + A_REGS, Pmode, VOIDmode, 0, 0, opnum, |
| 614 | + type); |
| 615 | + return 1; |
| 616 | + } |
| 617 | + |
| 618 | return 0; |
| 619 | } |
| 620 | |
| 621 | diff -Naur gcc-4.4.0.orig/gcc/config/rs6000/rs6000-c.c gcc-4.4.0/gcc/config/rs6000/rs6000-c.c |
| 622 | --- gcc-4.4.0.orig/gcc/config/rs6000/rs6000-c.c 2009-03-28 10:29:57.000000000 -0700 |
| 623 | +++ gcc-4.4.0/gcc/config/rs6000/rs6000-c.c 2009-05-29 00:14:20.000000000 -0700 |
| 624 | @@ -91,6 +91,7 @@ |
| 625 | static GTY(()) tree pixel_keyword; |
| 626 | static GTY(()) tree __bool_keyword; |
| 627 | static GTY(()) tree bool_keyword; |
| 628 | +static GTY(()) tree _Bool_keyword; |
| 629 | |
| 630 | /* Preserved across calls. */ |
| 631 | static tree expand_bool_pixel; |
| 632 | @@ -111,6 +112,9 @@ |
| 633 | if (ident == C_CPP_HASHNODE (bool_keyword)) |
| 634 | return C_CPP_HASHNODE (__bool_keyword); |
| 635 | |
| 636 | + if (ident == C_CPP_HASHNODE (_Bool_keyword)) |
| 637 | + return C_CPP_HASHNODE (__bool_keyword); |
| 638 | + |
| 639 | return ident; |
| 640 | } |
| 641 | |
| 642 | @@ -141,6 +145,9 @@ |
| 643 | |
| 644 | bool_keyword = get_identifier ("bool"); |
| 645 | C_CPP_HASHNODE (bool_keyword)->flags |= NODE_CONDITIONAL; |
| 646 | + |
| 647 | + _Bool_keyword = get_identifier ("_Bool"); |
| 648 | + C_CPP_HASHNODE (_Bool_keyword)->flags |= NODE_CONDITIONAL; |
| 649 | } |
| 650 | |
| 651 | /* Called to decide whether a conditional macro should be expanded. |
| 652 | @@ -295,6 +302,7 @@ |
| 653 | builtin_define ("vector=vector"); |
| 654 | builtin_define ("pixel=pixel"); |
| 655 | builtin_define ("bool=bool"); |
| 656 | + builtin_define ("_Bool=_Bool"); |
| 657 | init_vector_keywords (); |
| 658 | |
| 659 | /* Enable context-sensitive macros. */ |
| 1497 | diff -Naur gcc-4.4.0.orig/gcc/dfp.c gcc-4.4.0/gcc/dfp.c |
| 1498 | --- gcc-4.4.0.orig/gcc/dfp.c 2008-06-18 18:13:53.000000000 -0700 |
| 1499 | +++ gcc-4.4.0/gcc/dfp.c 2009-05-07 14:38:46.000000000 -0700 |
| 1500 | @@ -1,5 +1,5 @@ |
| 1501 | /* Decimal floating point support. |
| 1502 | - Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
| 1503 | + Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
| 1504 | |
| 1505 | This file is part of GCC. |
| 1506 | |
| 1507 | @@ -132,6 +132,7 @@ |
| 1508 | decNumber dn; |
| 1509 | decimal32 d32; |
| 1510 | decContext set; |
| 1511 | + int32_t image; |
| 1512 | |
| 1513 | decContextDefault (&set, DEC_INIT_DECIMAL128); |
| 1514 | set.traps = 0; |
| 1515 | @@ -139,7 +140,8 @@ |
| 1516 | decimal_to_decnumber (r, &dn); |
| 1517 | decimal32FromNumber (&d32, &dn, &set); |
| 1518 | |
| 1519 | - buf[0] = *(uint32_t *) d32.bytes; |
| 1520 | + memcpy (&image, d32.bytes, sizeof (int32_t)); |
| 1521 | + buf[0] = image; |
| 1522 | } |
| 1523 | |
| 1524 | /* Decode an IEEE 754 decimal32 type into a real. */ |
| 1525 | @@ -151,11 +153,13 @@ |
| 1526 | decNumber dn; |
| 1527 | decimal32 d32; |
| 1528 | decContext set; |
| 1529 | + int32_t image; |
| 1530 | |
| 1531 | decContextDefault (&set, DEC_INIT_DECIMAL128); |
| 1532 | set.traps = 0; |
| 1533 | |
| 1534 | - *((uint32_t *) d32.bytes) = (uint32_t) buf[0]; |
| 1535 | + image = buf[0]; |
| 1536 | + memcpy (&d32.bytes, &image, sizeof (int32_t)); |
| 1537 | |
| 1538 | decimal32ToNumber (&d32, &dn); |
| 1539 | decimal_from_decnumber (r, &dn, &set); |
| 1540 | @@ -170,6 +174,7 @@ |
| 1541 | decNumber dn; |
| 1542 | decimal64 d64; |
| 1543 | decContext set; |
| 1544 | + int32_t image; |
| 1545 | |
| 1546 | decContextDefault (&set, DEC_INIT_DECIMAL128); |
| 1547 | set.traps = 0; |
| 1548 | @@ -179,13 +184,17 @@ |
| 1549 | |
| 1550 | if (WORDS_BIGENDIAN == FLOAT_WORDS_BIG_ENDIAN) |
| 1551 | { |
| 1552 | - buf[0] = *(uint32_t *) &d64.bytes[0]; |
| 1553 | - buf[1] = *(uint32_t *) &d64.bytes[4]; |
| 1554 | + memcpy (&image, &d64.bytes[0], sizeof (int32_t)); |
| 1555 | + buf[0] = image; |
| 1556 | + memcpy (&image, &d64.bytes[4], sizeof (int32_t)); |
| 1557 | + buf[1] = image; |
| 1558 | } |
| 1559 | else |
| 1560 | { |
| 1561 | - buf[0] = *(uint32_t *) &d64.bytes[4]; |
| 1562 | - buf[1] = *(uint32_t *) &d64.bytes[0]; |
| 1563 | + memcpy (&image, &d64.bytes[4], sizeof (int32_t)); |
| 1564 | + buf[0] = image; |
| 1565 | + memcpy (&image, &d64.bytes[0], sizeof (int32_t)); |
| 1566 | + buf[1] = image; |
| 1567 | } |
| 1568 | } |
| 1569 | |
| 1570 | @@ -198,19 +207,24 @@ |
| 1571 | decNumber dn; |
| 1572 | decimal64 d64; |
| 1573 | decContext set; |
| 1574 | + int32_t image; |
| 1575 | |
| 1576 | decContextDefault (&set, DEC_INIT_DECIMAL128); |
| 1577 | set.traps = 0; |
| 1578 | |
| 1579 | if (WORDS_BIGENDIAN == FLOAT_WORDS_BIG_ENDIAN) |
| 1580 | { |
| 1581 | - *((uint32_t *) &d64.bytes[0]) = (uint32_t) buf[0]; |
| 1582 | - *((uint32_t *) &d64.bytes[4]) = (uint32_t) buf[1]; |
| 1583 | + image = buf[0]; |
| 1584 | + memcpy (&d64.bytes[0], &image, sizeof (int32_t)); |
| 1585 | + image = buf[1]; |
| 1586 | + memcpy (&d64.bytes[4], &image, sizeof (int32_t)); |
| 1587 | } |
| 1588 | else |
| 1589 | { |
| 1590 | - *((uint32_t *) &d64.bytes[0]) = (uint32_t) buf[1]; |
| 1591 | - *((uint32_t *) &d64.bytes[4]) = (uint32_t) buf[0]; |
| 1592 | + image = buf[1]; |
| 1593 | + memcpy (&d64.bytes[0], &image, sizeof (int32_t)); |
| 1594 | + image = buf[0]; |
| 1595 | + memcpy (&d64.bytes[4], &image, sizeof (int32_t)); |
| 1596 | } |
| 1597 | |
| 1598 | decimal64ToNumber (&d64, &dn); |
| 1599 | @@ -226,6 +240,7 @@ |
| 1600 | decNumber dn; |
| 1601 | decContext set; |
| 1602 | decimal128 d128; |
| 1603 | + int32_t image; |
| 1604 | |
| 1605 | decContextDefault (&set, DEC_INIT_DECIMAL128); |
| 1606 | set.traps = 0; |
| 1607 | @@ -235,17 +250,25 @@ |
| 1608 | |
| 1609 | if (WORDS_BIGENDIAN == FLOAT_WORDS_BIG_ENDIAN) |
| 1610 | { |
| 1611 | - buf[0] = *(uint32_t *) &d128.bytes[0]; |
| 1612 | - buf[1] = *(uint32_t *) &d128.bytes[4]; |
| 1613 | - buf[2] = *(uint32_t *) &d128.bytes[8]; |
| 1614 | - buf[3] = *(uint32_t *) &d128.bytes[12]; |
| 1615 | + memcpy (&image, &d128.bytes[0], sizeof (int32_t)); |
| 1616 | + buf[0] = image; |
| 1617 | + memcpy (&image, &d128.bytes[4], sizeof (int32_t)); |
| 1618 | + buf[1] = image; |
| 1619 | + memcpy (&image, &d128.bytes[8], sizeof (int32_t)); |
| 1620 | + buf[2] = image; |
| 1621 | + memcpy (&image, &d128.bytes[12], sizeof (int32_t)); |
| 1622 | + buf[3] = image; |
| 1623 | } |
| 1624 | else |
| 1625 | { |
| 1626 | - buf[0] = *(uint32_t *) &d128.bytes[12]; |
| 1627 | - buf[1] = *(uint32_t *) &d128.bytes[8]; |
| 1628 | - buf[2] = *(uint32_t *) &d128.bytes[4]; |
| 1629 | - buf[3] = *(uint32_t *) &d128.bytes[0]; |
| 1630 | + memcpy (&image, &d128.bytes[12], sizeof (int32_t)); |
| 1631 | + buf[0] = image; |
| 1632 | + memcpy (&image, &d128.bytes[8], sizeof (int32_t)); |
| 1633 | + buf[1] = image; |
| 1634 | + memcpy (&image, &d128.bytes[4], sizeof (int32_t)); |
| 1635 | + buf[2] = image; |
| 1636 | + memcpy (&image, &d128.bytes[0], sizeof (int32_t)); |
| 1637 | + buf[3] = image; |
| 1638 | } |
| 1639 | } |
| 1640 | |
| 1641 | @@ -258,23 +281,32 @@ |
| 1642 | decNumber dn; |
| 1643 | decimal128 d128; |
| 1644 | decContext set; |
| 1645 | + int32_t image; |
| 1646 | |
| 1647 | decContextDefault (&set, DEC_INIT_DECIMAL128); |
| 1648 | set.traps = 0; |
| 1649 | |
| 1650 | if (WORDS_BIGENDIAN == FLOAT_WORDS_BIG_ENDIAN) |
| 1651 | { |
| 1652 | - *((uint32_t *) &d128.bytes[0]) = (uint32_t) buf[0]; |
| 1653 | - *((uint32_t *) &d128.bytes[4]) = (uint32_t) buf[1]; |
| 1654 | - *((uint32_t *) &d128.bytes[8]) = (uint32_t) buf[2]; |
| 1655 | - *((uint32_t *) &d128.bytes[12]) = (uint32_t) buf[3]; |
| 1656 | + image = buf[0]; |
| 1657 | + memcpy (&d128.bytes[0], &image, sizeof (int32_t)); |
| 1658 | + image = buf[1]; |
| 1659 | + memcpy (&d128.bytes[4], &image, sizeof (int32_t)); |
| 1660 | + image = buf[2]; |
| 1661 | + memcpy (&d128.bytes[8], &image, sizeof (int32_t)); |
| 1662 | + image = buf[3]; |
| 1663 | + memcpy (&d128.bytes[12], &image, sizeof (int32_t)); |
| 1664 | } |
| 1665 | else |
| 1666 | { |
| 1667 | - *((uint32_t *) &d128.bytes[0]) = (uint32_t) buf[3]; |
| 1668 | - *((uint32_t *) &d128.bytes[4]) = (uint32_t) buf[2]; |
| 1669 | - *((uint32_t *) &d128.bytes[8]) = (uint32_t) buf[1]; |
| 1670 | - *((uint32_t *) &d128.bytes[12]) = (uint32_t) buf[0]; |
| 1671 | + image = buf[3]; |
| 1672 | + memcpy (&d128.bytes[0], &image, sizeof (int32_t)); |
| 1673 | + image = buf[2]; |
| 1674 | + memcpy (&d128.bytes[4], &image, sizeof (int32_t)); |
| 1675 | + image = buf[1]; |
| 1676 | + memcpy (&d128.bytes[8], &image, sizeof (int32_t)); |
| 1677 | + image = buf[0]; |
| 1678 | + memcpy (&d128.bytes[12], &image, sizeof (int32_t)); |
| 1679 | } |
| 1680 | |
| 1681 | decimal128ToNumber (&d128, &dn); |
| 1682 | diff -Naur gcc-4.4.0.orig/gcc/doc/gccint.texi gcc-4.4.0/gcc/doc/gccint.texi |
| 1683 | --- gcc-4.4.0.orig/gcc/doc/gccint.texi 2008-09-21 08:05:14.000000000 -0700 |
| 1684 | +++ gcc-4.4.0/gcc/doc/gccint.texi 2009-05-23 10:55:01.000000000 -0700 |
| 1685 | @@ -109,10 +109,10 @@ |
| 1686 | * Options:: Option specification files. |
| 1687 | * Passes:: Order of passes, what they do, and what each file is for. |
| 1688 | * Trees:: The source representation used by the C and C++ front ends. |
| 1689 | -* RTL:: The intermediate representation that most passes work on. |
| 1690 | * GENERIC:: Language-independent representation generated by Front Ends |
| 1691 | * GIMPLE:: Tuple representation used by Tree SSA optimizers |
| 1692 | * Tree SSA:: Analysis and optimization of GIMPLE |
| 1693 | +* RTL:: Machine-dependent low-level intermediate representation. |
| 1694 | * Control Flow:: Maintaining and manipulating the control flow graph. |
| 1695 | * Loop Analysis and Representation:: Analysis and representation of loops |
| 1696 | * Machine Desc:: How to write machine description instruction patterns. |
| 1697 | diff -Naur gcc-4.4.0.orig/gcc/doc/md.texi gcc-4.4.0/gcc/doc/md.texi |
| 1698 | --- gcc-4.4.0.orig/gcc/doc/md.texi 2009-02-20 07:20:38.000000000 -0800 |
| 1699 | +++ gcc-4.4.0/gcc/doc/md.texi 2009-05-07 01:14:55.000000000 -0700 |
| 1700 | @@ -5111,8 +5111,6 @@ |
| 1701 | Operand 0 is the memory on which the atomic operation is performed. |
| 1702 | Operand 1 is the second operand to the binary operator. |
| 1703 | |
| 1704 | -The ``nand'' operation is @code{~op0 & op1}. |
| 1705 | - |
| 1706 | This pattern must issue any memory barrier instructions such that all |
| 1707 | memory operations before the atomic operation occur before the atomic |
| 1708 | operation and all memory operations after the atomic operation occur |
| 1709 | diff -Naur gcc-4.4.0.orig/gcc/doc/passes.texi gcc-4.4.0/gcc/doc/passes.texi |
| 1710 | --- gcc-4.4.0.orig/gcc/doc/passes.texi 2009-02-20 07:20:38.000000000 -0800 |
| 1711 | +++ gcc-4.4.0/gcc/doc/passes.texi 2009-05-23 10:55:01.000000000 -0700 |
| 1712 | @@ -21,7 +21,7 @@ |
| 1713 | * Parsing pass:: The language front end turns text into bits. |
| 1714 | * Gimplification pass:: The bits are turned into something we can optimize. |
| 1715 | * Pass manager:: Sequencing the optimization passes. |
| 1716 | -* Tree-SSA passes:: Optimizations on a high-level representation. |
| 1717 | +* Tree SSA passes:: Optimizations on a high-level representation. |
| 1718 | * RTL passes:: Optimizations on a low-level representation. |
| 1719 | @end menu |
| 1720 | |
| 1721 | @@ -94,8 +94,8 @@ |
| 1722 | should be passed to @code{cgraph_finalize_function}. |
| 1723 | |
| 1724 | TODO: I know rest_of_compilation currently has all sorts of |
| 1725 | -rtl-generation semantics. I plan to move all code generation |
| 1726 | -bits (both tree and rtl) to compile_function. Should we hide |
| 1727 | +RTL generation semantics. I plan to move all code generation |
| 1728 | +bits (both Tree and RTL) to compile_function. Should we hide |
| 1729 | cgraph from the front ends and move back to rest_of_compilation |
| 1730 | as the official interface? Possibly we should rename all three |
| 1731 | interfaces such that the names match in some meaningful way and |
| 1732 | @@ -172,12 +172,12 @@ |
| 1733 | |
| 1734 | TODO: describe the global variables set up by the pass manager, |
| 1735 | and a brief description of how a new pass should use it. |
| 1736 | -I need to look at what info rtl passes use first@enddots{} |
| 1737 | +I need to look at what info RTL passes use first@enddots{} |
| 1738 | |
| 1739 | -@node Tree-SSA passes |
| 1740 | -@section Tree-SSA passes |
| 1741 | +@node Tree SSA passes |
| 1742 | +@section Tree SSA passes |
| 1743 | |
| 1744 | -The following briefly describes the tree optimization passes that are |
| 1745 | +The following briefly describes the Tree optimization passes that are |
| 1746 | run after gimplification and what source files they are located in. |
| 1747 | |
| 1748 | @itemize @bullet |
| 1749 | @@ -401,7 +401,7 @@ |
| 1750 | The optimizations performed by this pass are: |
| 1751 | |
| 1752 | Loop invariant motion. This pass moves only invariants that |
| 1753 | -would be hard to handle on rtl level (function calls, operations that expand to |
| 1754 | +would be hard to handle on RTL level (function calls, operations that expand to |
| 1755 | nontrivial sequences of insns). With @option{-funswitch-loops} it also moves |
| 1756 | operands of conditions that are invariant out of the loop, so that we can use |
| 1757 | just trivial invariantness analysis in loop unswitching. The pass also includes |
| 1758 | @@ -422,8 +422,8 @@ |
| 1759 | out of the loops. To achieve this, a duplicate of the loop is created for |
| 1760 | each possible outcome of conditional jump(s). The pass is implemented in |
| 1761 | @file{tree-ssa-loop-unswitch.c}. This pass should eventually replace the |
| 1762 | -rtl-level loop unswitching in @file{loop-unswitch.c}, but currently |
| 1763 | -the rtl-level pass is not completely redundant yet due to deficiencies |
| 1764 | +RTL level loop unswitching in @file{loop-unswitch.c}, but currently |
| 1765 | +the RTL level pass is not completely redundant yet due to deficiencies |
| 1766 | in tree level alias analysis. |
| 1767 | |
| 1768 | The optimizations also use various utility functions contained in |
| 1769 | @@ -651,8 +651,8 @@ |
| 1770 | @node RTL passes |
| 1771 | @section RTL passes |
| 1772 | |
| 1773 | -The following briefly describes the rtl generation and optimization |
| 1774 | -passes that are run after tree optimization. |
| 1775 | +The following briefly describes the RTL generation and optimization |
| 1776 | +passes that are run after the Tree optimization passes. |
| 1777 | |
| 1778 | @itemize @bullet |
| 1779 | @item RTL generation |
| 1780 | @@ -679,15 +679,15 @@ |
| 1781 | and @code{gencodes}, tell this pass which standard names are available |
| 1782 | for use and which patterns correspond to them. |
| 1783 | |
| 1784 | -@item Generate exception handling landing pads |
| 1785 | +@item Generation of exception landing pads |
| 1786 | |
| 1787 | This pass generates the glue that handles communication between the |
| 1788 | exception handling library routines and the exception handlers within |
| 1789 | the function. Entry points in the function that are invoked by the |
| 1790 | exception handling library are called @dfn{landing pads}. The code |
| 1791 | -for this pass is located within @file{except.c}. |
| 1792 | +for this pass is located in @file{except.c}. |
| 1793 | |
| 1794 | -@item Cleanup control flow graph |
| 1795 | +@item Control flow graph cleanup |
| 1796 | |
| 1797 | This pass removes unreachable code, simplifies jumps to next, jumps to |
| 1798 | jump, jumps across jumps, etc. The pass is run multiple times. |
| 1799 | @@ -702,16 +702,16 @@ |
| 1800 | variables that come from a single definition, and |
| 1801 | seeing if the result can be simplified. It performs copy propagation |
| 1802 | and addressing mode selection. The pass is run twice, with values |
| 1803 | -being propagated into loops only on the second run. It is located in |
| 1804 | -@file{fwprop.c}. |
| 1805 | +being propagated into loops only on the second run. The code is |
| 1806 | +located in @file{fwprop.c}. |
| 1807 | |
| 1808 | @item Common subexpression elimination |
| 1809 | |
| 1810 | This pass removes redundant computation within basic blocks, and |
| 1811 | optimizes addressing modes based on cost. The pass is run twice. |
| 1812 | -The source is located in @file{cse.c}. |
| 1813 | +The code for this pass is located in @file{cse.c}. |
| 1814 | |
| 1815 | -@item Global common subexpression elimination. |
| 1816 | +@item Global common subexpression elimination |
| 1817 | |
| 1818 | This pass performs two |
| 1819 | different types of GCSE depending on whether you are optimizing for |
| 1820 | @@ -755,22 +755,13 @@ |
| 1821 | assignments with arithmetic, boolean value producing comparison |
| 1822 | instructions, and conditional move instructions. In the very last |
| 1823 | invocation after reload, it will generate predicated instructions |
| 1824 | -when supported by the target. The pass is located in @file{ifcvt.c}. |
| 1825 | +when supported by the target. The code is located in @file{ifcvt.c}. |
| 1826 | |
| 1827 | @item Web construction |
| 1828 | |
| 1829 | This pass splits independent uses of each pseudo-register. This can |
| 1830 | improve effect of the other transformation, such as CSE or register |
| 1831 | -allocation. Its source files are @file{web.c}. |
| 1832 | - |
| 1833 | -@item Life analysis |
| 1834 | - |
| 1835 | -This pass computes which pseudo-registers are live at each point in |
| 1836 | -the program, and makes the first instruction that uses a value point |
| 1837 | -at the instruction that computed the value. It then deletes |
| 1838 | -computations whose results are never used, and combines memory |
| 1839 | -references with add or subtract instructions to make autoincrement or |
| 1840 | -autodecrement addressing. The pass is located in @file{flow.c}. |
| 1841 | +allocation. The code for this pass is located in @file{web.c}. |
| 1842 | |
| 1843 | @item Instruction combination |
| 1844 | |
| 1845 | @@ -778,23 +769,23 @@ |
| 1846 | are related by data flow into single instructions. It combines the |
| 1847 | RTL expressions for the instructions by substitution, simplifies the |
| 1848 | result using algebra, and then attempts to match the result against |
| 1849 | -the machine description. The pass is located in @file{combine.c}. |
| 1850 | +the machine description. The code is located in @file{combine.c}. |
| 1851 | |
| 1852 | @item Register movement |
| 1853 | |
| 1854 | This pass looks for cases where matching constraints would force an |
| 1855 | instruction to need a reload, and this reload would be a |
| 1856 | register-to-register move. It then attempts to change the registers |
| 1857 | -used by the instruction to avoid the move instruction. |
| 1858 | -The pass is located in @file{regmove.c}. |
| 1859 | +used by the instruction to avoid the move instruction. The code is |
| 1860 | +located in @file{regmove.c}. |
| 1861 | |
| 1862 | -@item Optimize mode switching |
| 1863 | +@item Mode switching optimization |
| 1864 | |
| 1865 | This pass looks for instructions that require the processor to be in a |
| 1866 | specific ``mode'' and minimizes the number of mode changes required to |
| 1867 | satisfy all users. What these modes are, and what they apply to are |
| 1868 | -completely target-specific. |
| 1869 | -The source is located in @file{mode-switching.c}. |
| 1870 | +completely target-specific. The code for this pass is located in |
| 1871 | +@file{mode-switching.c}. |
| 1872 | |
| 1873 | @cindex modulo scheduling |
| 1874 | @cindex sms, swing, software pipelining |
| 1875 | @@ -802,8 +793,8 @@ |
| 1876 | |
| 1877 | This pass looks at innermost loops and reorders their instructions |
| 1878 | by overlapping different iterations. Modulo scheduling is performed |
| 1879 | -immediately before instruction scheduling. |
| 1880 | -The pass is located in (@file{modulo-sched.c}). |
| 1881 | +immediately before instruction scheduling. The code for this pass is |
| 1882 | +located in @file{modulo-sched.c}. |
| 1883 | |
| 1884 | @item Instruction scheduling |
| 1885 | |
| 1886 | @@ -813,7 +804,7 @@ |
| 1887 | It re-orders instructions within a basic block to try to separate the |
| 1888 | definition and use of items that otherwise would cause pipeline |
| 1889 | stalls. This pass is performed twice, before and after register |
| 1890 | -allocation. The pass is located in @file{haifa-sched.c}, |
| 1891 | +allocation. The code for this pass is located in @file{haifa-sched.c}, |
| 1892 | @file{sched-deps.c}, @file{sched-ebb.c}, @file{sched-rgn.c} and |
| 1893 | @file{sched-vis.c}. |
| 1894 | |
| 1895 | @@ -884,13 +875,13 @@ |
| 1896 | position in code and generates notes describing the variable locations |
| 1897 | to RTL code. The location lists are then generated according to these |
| 1898 | notes to debug information if the debugging information format supports |
| 1899 | -location lists. |
| 1900 | +location lists. The code is located in @file{var-tracking.c}. |
| 1901 | |
| 1902 | @item Delayed branch scheduling |
| 1903 | |
| 1904 | This optional pass attempts to find instructions that can go into the |
| 1905 | -delay slots of other instructions, usually jumps and calls. The |
| 1906 | -source file name is @file{reorg.c}. |
| 1907 | +delay slots of other instructions, usually jumps and calls. The code |
| 1908 | +for this pass is located in @file{reorg.c}. |
| 1909 | |
| 1910 | @item Branch shortening |
| 1911 | |
| 1912 | @@ -899,13 +890,14 @@ |
| 1913 | In this pass, the compiler figures out what how far each instruction |
| 1914 | will be from each other instruction, and therefore whether the usual |
| 1915 | instructions, or the longer sequences, must be used for each branch. |
| 1916 | +The code for this pass is located in @file{final.c}. |
| 1917 | |
| 1918 | @item Register-to-stack conversion |
| 1919 | |
| 1920 | Conversion from usage of some hard registers to usage of a register |
| 1921 | stack may be done at this point. Currently, this is supported only |
| 1922 | -for the floating-point registers of the Intel 80387 coprocessor. The |
| 1923 | -source file name is @file{reg-stack.c}. |
| 1924 | +for the floating-point registers of the Intel 80387 coprocessor. The |
| 1925 | +code for this pass is located in @file{reg-stack.c}. |
| 1926 | |
| 1927 | @item Final |
| 1928 | |
| 1929 | diff -Naur gcc-4.4.0.orig/gcc/doc/rtl.texi gcc-4.4.0/gcc/doc/rtl.texi |
| 1930 | --- gcc-4.4.0.orig/gcc/doc/rtl.texi 2008-10-15 17:51:34.000000000 -0700 |
| 1931 | +++ gcc-4.4.0/gcc/doc/rtl.texi 2009-05-23 10:55:01.000000000 -0700 |
| 1932 | @@ -10,10 +10,10 @@ |
| 1933 | @cindex representation of RTL |
| 1934 | @cindex Register Transfer Language (RTL) |
| 1935 | |
| 1936 | -Most of the work of the compiler is done on an intermediate representation |
| 1937 | -called register transfer language. In this language, the instructions to be |
| 1938 | -output are described, pretty much one by one, in an algebraic form that |
| 1939 | -describes what the instruction does. |
| 1940 | +The last part of the compiler work is done on a low-level intermediate |
| 1941 | +representation called Register Transfer Language. In this language, the |
| 1942 | +instructions to be output are described, pretty much one by one, in an |
| 1943 | +algebraic form that describes what the instruction does. |
| 1944 | |
| 1945 | RTL is inspired by Lisp lists. It has both an internal form, made up of |
| 1946 | structures that point at other structures, and a textual form that is used |
| 1947 | diff -Naur gcc-4.4.0.orig/gcc/dojump.c gcc-4.4.0/gcc/dojump.c |
| 1948 | --- gcc-4.4.0.orig/gcc/dojump.c 2009-01-09 05:43:14.000000000 -0800 |
| 1949 | +++ gcc-4.4.0/gcc/dojump.c 2009-05-07 08:36:23.000000000 -0700 |
| 1950 | @@ -141,7 +141,8 @@ |
| 1951 | } |
| 1952 | |
| 1953 | /* Fill in the integers. */ |
| 1954 | - XEXP (and_test, 1) = GEN_INT ((unsigned HOST_WIDE_INT) 1 << bitnum); |
| 1955 | + XEXP (and_test, 1) |
| 1956 | + = immed_double_const ((unsigned HOST_WIDE_INT) 1 << bitnum, 0, mode); |
| 1957 | XEXP (XEXP (shift_test, 0), 1) = GEN_INT (bitnum); |
| 1958 | |
| 1959 | return (rtx_cost (and_test, IF_THEN_ELSE, optimize_insn_for_speed_p ()) |
| 1960 | @@ -475,10 +476,10 @@ |
| 1961 | && prefer_and_bit_test (TYPE_MODE (argtype), |
| 1962 | TREE_INT_CST_LOW (shift))) |
| 1963 | { |
| 1964 | - HOST_WIDE_INT mask = (HOST_WIDE_INT) 1 |
| 1965 | - << TREE_INT_CST_LOW (shift); |
| 1966 | + unsigned HOST_WIDE_INT mask |
| 1967 | + = (unsigned HOST_WIDE_INT) 1 << TREE_INT_CST_LOW (shift); |
| 1968 | do_jump (build2 (BIT_AND_EXPR, argtype, arg, |
| 1969 | - build_int_cst_type (argtype, mask)), |
| 1970 | + build_int_cst_wide_type (argtype, mask, 0)), |
| 1971 | clr_label, set_label); |
| 1972 | break; |
| 1973 | } |
| 2146 | diff -Naur gcc-4.4.0.orig/gcc/dwarf2out.c gcc-4.4.0/gcc/dwarf2out.c |
| 2147 | --- gcc-4.4.0.orig/gcc/dwarf2out.c 2009-03-23 16:21:38.000000000 -0700 |
| 2148 | +++ gcc-4.4.0/gcc/dwarf2out.c 2009-06-03 10:32:45.000000000 -0700 |
| 2149 | @@ -694,14 +694,15 @@ |
| 2150 | *p = cfi; |
| 2151 | } |
| 2152 | |
| 2153 | -/* Generate a new label for the CFI info to refer to. */ |
| 2154 | +/* Generate a new label for the CFI info to refer to. FORCE is true |
| 2155 | + if a label needs to be output even when using .cfi_* directives. */ |
| 2156 | |
| 2157 | char * |
| 2158 | -dwarf2out_cfi_label (void) |
| 2159 | +dwarf2out_cfi_label (bool force) |
| 2160 | { |
| 2161 | static char label[20]; |
| 2162 | |
| 2163 | - if (dwarf2out_do_cfi_asm ()) |
| 2164 | + if (!force && dwarf2out_do_cfi_asm ()) |
| 2165 | { |
| 2166 | /* In this case, we will be emitting the asm directive instead of |
| 2167 | the label, so just return a placeholder to keep the rest of the |
| 2168 | @@ -729,11 +730,59 @@ |
| 2169 | { |
| 2170 | if (label) |
| 2171 | { |
| 2172 | - output_cfi_directive (cfi); |
| 2173 | + dw_fde_ref fde = current_fde (); |
| 2174 | + |
| 2175 | + gcc_assert (fde != NULL); |
| 2176 | |
| 2177 | /* We still have to add the cfi to the list so that |
| 2178 | - lookup_cfa works later on. */ |
| 2179 | - list_head = ¤t_fde ()->dw_fde_cfi; |
| 2180 | + lookup_cfa works later on. When -g2 and above we |
| 2181 | + even need to force emitting of CFI labels and |
| 2182 | + add to list a DW_CFA_set_loc for convert_cfa_to_fb_loc_list |
| 2183 | + purposes. */ |
| 2184 | + switch (cfi->dw_cfi_opc) |
| 2185 | + { |
| 2186 | + case DW_CFA_def_cfa_offset: |
| 2187 | + case DW_CFA_def_cfa_offset_sf: |
| 2188 | + case DW_CFA_def_cfa_register: |
| 2189 | + case DW_CFA_def_cfa: |
| 2190 | + case DW_CFA_def_cfa_sf: |
| 2191 | + case DW_CFA_def_cfa_expression: |
| 2192 | + case DW_CFA_restore_state: |
| 2193 | + if (write_symbols != DWARF2_DEBUG |
| 2194 | + && write_symbols != VMS_AND_DWARF2_DEBUG) |
| 2195 | + break; |
| 2196 | + if (debug_info_level <= DINFO_LEVEL_TERSE) |
| 2197 | + break; |
| 2198 | + |
| 2199 | + if (*label == 0 || strcmp (label, "<do not output>") == 0) |
| 2200 | + label = dwarf2out_cfi_label (true); |
| 2201 | + |
| 2202 | + if (fde->dw_fde_current_label == NULL |
| 2203 | + || strcmp (label, fde->dw_fde_current_label) != 0) |
| 2204 | + { |
| 2205 | + dw_cfi_ref xcfi; |
| 2206 | + |
| 2207 | + label = xstrdup (label); |
| 2208 | + |
| 2209 | + /* Set the location counter to the new label. */ |
| 2210 | + xcfi = new_cfi (); |
| 2211 | + /* It doesn't metter whether DW_CFA_set_loc |
| 2212 | + or DW_CFA_advance_loc4 is added here, those aren't |
| 2213 | + emitted into assembly, only looked up by |
| 2214 | + convert_cfa_to_fb_loc_list. */ |
| 2215 | + xcfi->dw_cfi_opc = DW_CFA_set_loc; |
| 2216 | + xcfi->dw_cfi_oprnd1.dw_cfi_addr = label; |
| 2217 | + add_cfi (&fde->dw_fde_cfi, xcfi); |
| 2218 | + fde->dw_fde_current_label = label; |
| 2219 | + } |
| 2220 | + break; |
| 2221 | + default: |
| 2222 | + break; |
| 2223 | + } |
| 2224 | + |
| 2225 | + output_cfi_directive (cfi); |
| 2226 | + |
| 2227 | + list_head = &fde->dw_fde_cfi; |
| 2228 | } |
| 2229 | /* ??? If this is a CFI for the CIE, we don't emit. This |
| 2230 | assumes that the standard CIE contents that the assembler |
| 2231 | @@ -748,7 +797,7 @@ |
| 2232 | gcc_assert (fde != NULL); |
| 2233 | |
| 2234 | if (*label == 0) |
| 2235 | - label = dwarf2out_cfi_label (); |
| 2236 | + label = dwarf2out_cfi_label (false); |
| 2237 | |
| 2238 | if (fde->dw_fde_current_label == NULL |
| 2239 | || strcmp (label, fde->dw_fde_current_label) != 0) |
| 2240 | @@ -1464,7 +1513,7 @@ |
| 2241 | if (offset == 0) |
| 2242 | return; |
| 2243 | |
| 2244 | - label = dwarf2out_cfi_label (); |
| 2245 | + label = dwarf2out_cfi_label (false); |
| 2246 | dwarf2out_args_size_adjust (offset, label); |
| 2247 | } |
| 2248 | |
| 2249 | @@ -2417,7 +2466,7 @@ |
| 2250 | return; |
| 2251 | } |
| 2252 | |
| 2253 | - label = dwarf2out_cfi_label (); |
| 2254 | + label = dwarf2out_cfi_label (false); |
| 2255 | src = find_reg_note (insn, REG_FRAME_RELATED_EXPR, NULL_RTX); |
| 2256 | if (src) |
| 2257 | insn = XEXP (src, 0); |
| 2258 | @@ -2731,42 +2780,42 @@ |
| 2259 | case DW_CFA_offset: |
| 2260 | case DW_CFA_offset_extended: |
| 2261 | case DW_CFA_offset_extended_sf: |
| 2262 | - r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0); |
| 2263 | + r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1); |
| 2264 | fprintf (asm_out_file, "\t.cfi_offset %lu, "HOST_WIDE_INT_PRINT_DEC"\n", |
| 2265 | r, cfi->dw_cfi_oprnd2.dw_cfi_offset); |
| 2266 | break; |
| 2267 | |
| 2268 | case DW_CFA_restore: |
| 2269 | case DW_CFA_restore_extended: |
| 2270 | - r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0); |
| 2271 | + r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1); |
| 2272 | fprintf (asm_out_file, "\t.cfi_restore %lu\n", r); |
| 2273 | break; |
| 2274 | |
| 2275 | case DW_CFA_undefined: |
| 2276 | - r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0); |
| 2277 | + r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1); |
| 2278 | fprintf (asm_out_file, "\t.cfi_undefined %lu\n", r); |
| 2279 | break; |
| 2280 | |
| 2281 | case DW_CFA_same_value: |
| 2282 | - r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0); |
| 2283 | + r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1); |
| 2284 | fprintf (asm_out_file, "\t.cfi_same_value %lu\n", r); |
| 2285 | break; |
| 2286 | |
| 2287 | case DW_CFA_def_cfa: |
| 2288 | case DW_CFA_def_cfa_sf: |
| 2289 | - r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0); |
| 2290 | + r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1); |
| 2291 | fprintf (asm_out_file, "\t.cfi_def_cfa %lu, "HOST_WIDE_INT_PRINT_DEC"\n", |
| 2292 | r, cfi->dw_cfi_oprnd2.dw_cfi_offset); |
| 2293 | break; |
| 2294 | |
| 2295 | case DW_CFA_def_cfa_register: |
| 2296 | - r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0); |
| 2297 | + r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1); |
| 2298 | fprintf (asm_out_file, "\t.cfi_def_cfa_register %lu\n", r); |
| 2299 | break; |
| 2300 | |
| 2301 | case DW_CFA_register: |
| 2302 | - r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0); |
| 2303 | - r2 = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd2.dw_cfi_reg_num, 0); |
| 2304 | + r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1); |
| 2305 | + r2 = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd2.dw_cfi_reg_num, 1); |
| 2306 | fprintf (asm_out_file, "\t.cfi_register %lu, %lu\n", r, r2); |
| 2307 | break; |
| 2308 | |
| 2309 | @@ -14646,6 +14695,12 @@ |
| 2310 | /* Prevent broken recursion; we can't hand off to the same type. */ |
| 2311 | gcc_assert (DECL_ORIGINAL_TYPE (TYPE_NAME (type)) != type); |
| 2312 | |
| 2313 | + /* Use the DIE of the containing namespace as the parent DIE of |
| 2314 | + the type description DIE we want to generate. */ |
| 2315 | + if (DECL_CONTEXT (TYPE_NAME (type)) |
| 2316 | + && TREE_CODE (DECL_CONTEXT (TYPE_NAME (type))) == NAMESPACE_DECL) |
| 2317 | + context_die = lookup_decl_die (DECL_CONTEXT (TYPE_NAME (type))); |
| 2318 | + |
| 2319 | TREE_ASM_WRITTEN (type) = 1; |
| 2320 | gen_decl_die (TYPE_NAME (type), NULL, context_die); |
| 2321 | return; |
| 2440 | diff -Naur gcc-4.4.0.orig/gcc/fortran/module.c gcc-4.4.0/gcc/fortran/module.c |
| 2441 | --- gcc-4.4.0.orig/gcc/fortran/module.c 2009-02-26 23:45:47.000000000 -0800 |
| 2442 | +++ gcc-4.4.0/gcc/fortran/module.c 2009-05-22 05:54:23.000000000 -0700 |
| 2443 | @@ -4738,7 +4738,7 @@ |
| 2444 | if ((file = fopen (filename, "r")) == NULL) |
| 2445 | return -1; |
| 2446 | |
| 2447 | - /* Read two lines. */ |
| 2448 | + /* Read the first line. */ |
| 2449 | if (fgets (buf, sizeof (buf) - 1, file) == NULL) |
| 2450 | { |
| 2451 | fclose (file); |
| 2452 | @@ -4748,8 +4748,12 @@ |
| 2453 | /* The file also needs to be overwritten if the version number changed. */ |
| 2454 | n = strlen ("GFORTRAN module version '" MOD_VERSION "' created"); |
| 2455 | if (strncmp (buf, "GFORTRAN module version '" MOD_VERSION "' created", n) != 0) |
| 2456 | - return -1; |
| 2457 | + { |
| 2458 | + fclose (file); |
| 2459 | + return -1; |
| 2460 | + } |
| 2461 | |
| 2462 | + /* Read a second line. */ |
| 2463 | if (fgets (buf, sizeof (buf) - 1, file) == NULL) |
| 2464 | { |
| 2465 | fclose (file); |
| 2466 | diff -Naur gcc-4.4.0.orig/gcc/fortran/simplify.c gcc-4.4.0/gcc/fortran/simplify.c |
| 2467 | --- gcc-4.4.0.orig/gcc/fortran/simplify.c 2009-03-06 01:06:51.000000000 -0800 |
| 2468 | +++ gcc-4.4.0/gcc/fortran/simplify.c 2009-06-03 12:39:09.000000000 -0700 |
| 2469 | @@ -2410,10 +2410,13 @@ |
| 2470 | bs = gfc_integer_kinds[i].bit_size; |
| 2471 | if (mpz_cmp_si (e->value.integer, 0) == 0) |
| 2472 | lz = bs; |
| 2473 | + else if (mpz_cmp_si (e->value.integer, 0) < 0) |
| 2474 | + lz = 0; |
| 2475 | else |
| 2476 | lz = bs - mpz_sizeinbase (e->value.integer, 2); |
| 2477 | |
| 2478 | - result = gfc_constant_result (BT_INTEGER, gfc_default_integer_kind, &e->where); |
| 2479 | + result = gfc_constant_result (BT_INTEGER, gfc_default_integer_kind, |
| 2480 | + &e->where); |
| 2481 | mpz_set_ui (result->value.integer, lz); |
| 2482 | |
| 2483 | return result; |
| 2484 | diff -Naur gcc-4.4.0.orig/gcc/fortran/trans-array.c gcc-4.4.0/gcc/fortran/trans-array.c |
| 2485 | --- gcc-4.4.0.orig/gcc/fortran/trans-array.c 2009-02-25 22:23:42.000000000 -0800 |
| 2486 | +++ gcc-4.4.0/gcc/fortran/trans-array.c 2009-05-10 09:14:37.000000000 -0700 |
| 2487 | @@ -1246,10 +1246,11 @@ |
| 2488 | gfc_init_se (&se, NULL); |
| 2489 | gfc_conv_constant (&se, p->expr); |
| 2490 | |
| 2491 | + if (c->expr->ts.type != BT_CHARACTER) |
| 2492 | + se.expr = fold_convert (type, se.expr); |
| 2493 | /* For constant character array constructors we build |
| 2494 | an array of pointers. */ |
| 2495 | - if (p->expr->ts.type == BT_CHARACTER |
| 2496 | - && POINTER_TYPE_P (type)) |
| 2497 | + else if (POINTER_TYPE_P (type)) |
| 2498 | se.expr = gfc_build_addr_expr |
| 2499 | (gfc_get_pchar_type (p->expr->ts.kind), |
| 2500 | se.expr); |
| 2501 | @@ -1618,7 +1619,9 @@ |
| 2502 | { |
| 2503 | gfc_init_se (&se, NULL); |
| 2504 | gfc_conv_constant (&se, c->expr); |
| 2505 | - if (c->expr->ts.type == BT_CHARACTER && POINTER_TYPE_P (type)) |
| 2506 | + if (c->expr->ts.type != BT_CHARACTER) |
| 2507 | + se.expr = fold_convert (type, se.expr); |
| 2508 | + else if (POINTER_TYPE_P (type)) |
| 2509 | se.expr = gfc_build_addr_expr (gfc_get_pchar_type (c->expr->ts.kind), |
| 2510 | se.expr); |
| 2511 | list = tree_cons (build_int_cst (gfc_array_index_type, nelem), |
| 2512 | diff -Naur gcc-4.4.0.orig/gcc/fortran/trans.c gcc-4.4.0/gcc/fortran/trans.c |
| 2513 | --- gcc-4.4.0.orig/gcc/fortran/trans.c 2008-11-01 06:26:19.000000000 -0700 |
| 2514 | +++ gcc-4.4.0/gcc/fortran/trans.c 2009-05-10 08:34:55.000000000 -0700 |
| 2515 | @@ -1109,12 +1109,14 @@ |
| 2516 | if (code->resolved_isym |
| 2517 | && code->resolved_isym->id == GFC_ISYM_MVBITS) |
| 2518 | is_mvbits = true; |
| 2519 | - res = gfc_trans_call (code, is_mvbits); |
| 2520 | + res = gfc_trans_call (code, is_mvbits, NULL_TREE, |
| 2521 | + NULL_TREE, false); |
| 2522 | } |
| 2523 | break; |
| 2524 | |
| 2525 | case EXEC_ASSIGN_CALL: |
| 2526 | - res = gfc_trans_call (code, true); |
| 2527 | + res = gfc_trans_call (code, true, NULL_TREE, |
| 2528 | + NULL_TREE, false); |
| 2529 | break; |
| 2530 | |
| 2531 | case EXEC_RETURN: |
| 2532 | diff -Naur gcc-4.4.0.orig/gcc/fortran/trans-decl.c gcc-4.4.0/gcc/fortran/trans-decl.c |
| 2533 | --- gcc-4.4.0.orig/gcc/fortran/trans-decl.c 2009-04-08 07:03:33.000000000 -0700 |
| 2534 | +++ gcc-4.4.0/gcc/fortran/trans-decl.c 2009-06-03 12:39:09.000000000 -0700 |
| 2535 | @@ -141,6 +141,8 @@ |
| 2536 | tree gfor_fndecl_size0; |
| 2537 | tree gfor_fndecl_size1; |
| 2538 | tree gfor_fndecl_iargc; |
| 2539 | +tree gfor_fndecl_clz128; |
| 2540 | +tree gfor_fndecl_ctz128; |
| 2541 | |
| 2542 | /* Intrinsic functions implemented in Fortran. */ |
| 2543 | tree gfor_fndecl_sc_kind; |
| 2544 | @@ -2488,6 +2490,19 @@ |
| 2545 | gfc_build_library_function_decl (get_identifier (PREFIX ("iargc")), |
| 2546 | gfc_int4_type_node, |
| 2547 | 0); |
| 2548 | + |
| 2549 | + if (gfc_type_for_size (128, true)) |
| 2550 | + { |
| 2551 | + tree uint128 = gfc_type_for_size (128, true); |
| 2552 | + |
| 2553 | + gfor_fndecl_clz128 = |
| 2554 | + gfc_build_library_function_decl (get_identifier (PREFIX ("clz128")), |
| 2555 | + integer_type_node, 1, uint128); |
| 2556 | + |
| 2557 | + gfor_fndecl_ctz128 = |
| 2558 | + gfc_build_library_function_decl (get_identifier (PREFIX ("ctz128")), |
| 2559 | + integer_type_node, 1, uint128); |
| 2560 | + } |
| 2561 | } |
| 2562 | |
| 2563 | |
| 2564 | diff -Naur gcc-4.4.0.orig/gcc/fortran/trans-expr.c gcc-4.4.0/gcc/fortran/trans-expr.c |
| 2565 | --- gcc-4.4.0.orig/gcc/fortran/trans-expr.c 2009-02-20 07:20:38.000000000 -0800 |
| 2566 | +++ gcc-4.4.0/gcc/fortran/trans-expr.c 2009-05-10 08:34:55.000000000 -0700 |
| 2567 | @@ -1526,48 +1526,6 @@ |
| 2568 | } |
| 2569 | |
| 2570 | |
| 2571 | -/* Translate the call for an elemental subroutine call used in an operator |
| 2572 | - assignment. This is a simplified version of gfc_conv_function_call. */ |
| 2573 | - |
| 2574 | -tree |
| 2575 | -gfc_conv_operator_assign (gfc_se *lse, gfc_se *rse, gfc_symbol *sym) |
| 2576 | -{ |
| 2577 | - tree args; |
| 2578 | - tree tmp; |
| 2579 | - gfc_se se; |
| 2580 | - stmtblock_t block; |
| 2581 | - |
| 2582 | - /* Only elemental subroutines with two arguments. */ |
| 2583 | - gcc_assert (sym->attr.elemental && sym->attr.subroutine); |
| 2584 | - gcc_assert (sym->formal->next->next == NULL); |
| 2585 | - |
| 2586 | - gfc_init_block (&block); |
| 2587 | - |
| 2588 | - gfc_add_block_to_block (&block, &lse->pre); |
| 2589 | - gfc_add_block_to_block (&block, &rse->pre); |
| 2590 | - |
| 2591 | - /* Build the argument list for the call, including hidden string lengths. */ |
| 2592 | - args = gfc_chainon_list (NULL_TREE, build_fold_addr_expr (lse->expr)); |
| 2593 | - args = gfc_chainon_list (args, build_fold_addr_expr (rse->expr)); |
| 2594 | - if (lse->string_length != NULL_TREE) |
| 2595 | - args = gfc_chainon_list (args, lse->string_length); |
| 2596 | - if (rse->string_length != NULL_TREE) |
| 2597 | - args = gfc_chainon_list (args, rse->string_length); |
| 2598 | - |
| 2599 | - /* Build the function call. */ |
| 2600 | - gfc_init_se (&se, NULL); |
| 2601 | - gfc_conv_function_val (&se, sym); |
| 2602 | - tmp = TREE_TYPE (TREE_TYPE (TREE_TYPE (se.expr))); |
| 2603 | - tmp = build_call_list (tmp, se.expr, args); |
| 2604 | - gfc_add_expr_to_block (&block, tmp); |
| 2605 | - |
| 2606 | - gfc_add_block_to_block (&block, &lse->post); |
| 2607 | - gfc_add_block_to_block (&block, &rse->post); |
| 2608 | - |
| 2609 | - return gfc_finish_block (&block); |
| 2610 | -} |
| 2611 | - |
| 2612 | - |
| 2613 | /* Initialize MAPPING. */ |
| 2614 | |
| 2615 | void |
| 2616 | @@ -2782,7 +2740,18 @@ |
| 2617 | break; |
| 2618 | } |
| 2619 | |
| 2620 | + if (e->expr_type == EXPR_OP |
| 2621 | + && e->value.op.op == INTRINSIC_PARENTHESES |
| 2622 | + && e->value.op.op1->expr_type == EXPR_VARIABLE) |
| 2623 | + { |
| 2624 | + tree local_tmp; |
| 2625 | + local_tmp = gfc_evaluate_now (tmp, &se->pre); |
| 2626 | + local_tmp = gfc_copy_alloc_comp (e->ts.derived, local_tmp, tmp, parm_rank); |
| 2627 | + gfc_add_expr_to_block (&se->post, local_tmp); |
| 2628 | + } |
| 2629 | + |
| 2630 | tmp = gfc_deallocate_alloc_comp (e->ts.derived, tmp, parm_rank); |
| 2631 | + |
| 2632 | gfc_add_expr_to_block (&se->post, tmp); |
| 2633 | } |
| 2634 | |
| 2635 | diff -Naur gcc-4.4.0.orig/gcc/fortran/trans.h gcc-4.4.0/gcc/fortran/trans.h |
| 2636 | --- gcc-4.4.0.orig/gcc/fortran/trans.h 2008-12-18 02:05:54.000000000 -0800 |
| 2637 | +++ gcc-4.4.0/gcc/fortran/trans.h 2009-06-03 12:39:09.000000000 -0700 |
| 2638 | @@ -310,9 +310,6 @@ |
| 2639 | /* Does an intrinsic map directly to an external library call. */ |
| 2640 | int gfc_is_intrinsic_libcall (gfc_expr *); |
| 2641 | |
| 2642 | -/* Used to call the elemental subroutines used in operator assignments. */ |
| 2643 | -tree gfc_conv_operator_assign (gfc_se *, gfc_se *, gfc_symbol *); |
| 2644 | - |
| 2645 | /* Also used to CALL subroutines. */ |
| 2646 | int gfc_conv_function_call (gfc_se *, gfc_symbol *, gfc_actual_arglist *, |
| 2647 | tree); |
| 2648 | @@ -594,6 +591,8 @@ |
| 2649 | extern GTY(()) tree gfor_fndecl_size0; |
| 2650 | extern GTY(()) tree gfor_fndecl_size1; |
| 2651 | extern GTY(()) tree gfor_fndecl_iargc; |
| 2652 | +extern GTY(()) tree gfor_fndecl_clz128; |
| 2653 | +extern GTY(()) tree gfor_fndecl_ctz128; |
| 2654 | |
| 2655 | /* Implemented in Fortran. */ |
| 2656 | extern GTY(()) tree gfor_fndecl_sc_kind; |
1273 | | +++ gcc-4.4.0/gcc/fortran/trans-intrinsic.c 2009-04-22 04:37:04.000000000 -0700 |
1274 | | @@ -3129,32 +3129,32 @@ |
| 2659 | +++ gcc-4.4.0/gcc/fortran/trans-intrinsic.c 2009-06-03 12:39:09.000000000 -0700 |
| 2660 | @@ -2707,53 +2707,51 @@ |
| 2661 | tree leadz; |
| 2662 | tree bit_size; |
| 2663 | tree tmp; |
| 2664 | - int arg_kind; |
| 2665 | - int i, n, s; |
| 2666 | + tree func; |
| 2667 | + int s, argsize; |
| 2668 | |
| 2669 | gfc_conv_intrinsic_function_args (se, expr, &arg, 1); |
| 2670 | + argsize = TYPE_PRECISION (TREE_TYPE (arg)); |
| 2671 | |
| 2672 | /* Which variant of __builtin_clz* should we call? */ |
| 2673 | - arg_kind = expr->value.function.actual->expr->ts.kind; |
| 2674 | - i = gfc_validate_kind (BT_INTEGER, arg_kind, false); |
| 2675 | - switch (arg_kind) |
| 2676 | + if (argsize <= INT_TYPE_SIZE) |
| 2677 | { |
| 2678 | - case 1: |
| 2679 | - case 2: |
| 2680 | - case 4: |
| 2681 | - arg_type = unsigned_type_node; |
| 2682 | - n = BUILT_IN_CLZ; |
| 2683 | - break; |
| 2684 | - |
| 2685 | - case 8: |
| 2686 | - arg_type = long_unsigned_type_node; |
| 2687 | - n = BUILT_IN_CLZL; |
| 2688 | - break; |
| 2689 | - |
| 2690 | - case 16: |
| 2691 | - arg_type = long_long_unsigned_type_node; |
| 2692 | - n = BUILT_IN_CLZLL; |
| 2693 | - break; |
| 2694 | - |
| 2695 | - default: |
| 2696 | - gcc_unreachable (); |
| 2697 | + arg_type = unsigned_type_node; |
| 2698 | + func = built_in_decls[BUILT_IN_CLZ]; |
| 2699 | + } |
| 2700 | + else if (argsize <= LONG_TYPE_SIZE) |
| 2701 | + { |
| 2702 | + arg_type = long_unsigned_type_node; |
| 2703 | + func = built_in_decls[BUILT_IN_CLZL]; |
| 2704 | + } |
| 2705 | + else if (argsize <= LONG_LONG_TYPE_SIZE) |
| 2706 | + { |
| 2707 | + arg_type = long_long_unsigned_type_node; |
| 2708 | + func = built_in_decls[BUILT_IN_CLZLL]; |
| 2709 | + } |
| 2710 | + else |
| 2711 | + { |
| 2712 | + gcc_assert (argsize == 128); |
| 2713 | + arg_type = gfc_build_uint_type (argsize); |
| 2714 | + func = gfor_fndecl_clz128; |
| 2715 | } |
| 2716 | |
| 2717 | - /* Convert the actual argument to the proper argument type for the built-in |
| 2718 | + /* Convert the actual argument twice: first, to the unsigned type of the |
| 2719 | + same size; then, to the proper argument type for the built-in |
| 2720 | function. But the return type is of the default INTEGER kind. */ |
| 2721 | + arg = fold_convert (gfc_build_uint_type (argsize), arg); |
| 2722 | arg = fold_convert (arg_type, arg); |
| 2723 | result_type = gfc_get_int_type (gfc_default_integer_kind); |
| 2724 | |
| 2725 | /* Compute LEADZ for the case i .ne. 0. */ |
| 2726 | - s = TYPE_PRECISION (arg_type) - gfc_integer_kinds[i].bit_size; |
| 2727 | - tmp = fold_convert (result_type, build_call_expr (built_in_decls[n], 1, arg)); |
| 2728 | + s = TYPE_PRECISION (arg_type) - argsize; |
| 2729 | + tmp = fold_convert (result_type, build_call_expr (func, 1, arg)); |
| 2730 | leadz = fold_build2 (MINUS_EXPR, result_type, |
| 2731 | tmp, build_int_cst (result_type, s)); |
| 2732 | |
| 2733 | /* Build BIT_SIZE. */ |
| 2734 | - bit_size = build_int_cst (result_type, gfc_integer_kinds[i].bit_size); |
| 2735 | + bit_size = build_int_cst (result_type, argsize); |
| 2736 | |
| 2737 | - /* ??? For some combinations of targets and integer kinds, the condition |
| 2738 | - can be avoided if CLZ_DEFINED_VALUE_AT_ZERO is used. Later. */ |
| 2739 | cond = fold_build2 (EQ_EXPR, boolean_type_node, |
| 2740 | arg, build_int_cst (arg_type, 0)); |
| 2741 | se->expr = fold_build3 (COND_EXPR, result_type, cond, bit_size, leadz); |
| 2742 | @@ -2774,50 +2772,48 @@ |
| 2743 | tree result_type; |
| 2744 | tree trailz; |
| 2745 | tree bit_size; |
| 2746 | - int arg_kind; |
| 2747 | - int i, n; |
| 2748 | + tree func; |
| 2749 | + int argsize; |
| 2750 | |
| 2751 | gfc_conv_intrinsic_function_args (se, expr, &arg, 1); |
| 2752 | + argsize = TYPE_PRECISION (TREE_TYPE (arg)); |
| 2753 | |
| 2754 | - /* Which variant of __builtin_clz* should we call? */ |
| 2755 | - arg_kind = expr->value.function.actual->expr->ts.kind; |
| 2756 | - i = gfc_validate_kind (BT_INTEGER, arg_kind, false); |
| 2757 | - switch (expr->ts.kind) |
| 2758 | + /* Which variant of __builtin_ctz* should we call? */ |
| 2759 | + if (argsize <= INT_TYPE_SIZE) |
| 2760 | { |
| 2761 | - case 1: |
| 2762 | - case 2: |
| 2763 | - case 4: |
| 2764 | - arg_type = unsigned_type_node; |
| 2765 | - n = BUILT_IN_CTZ; |
| 2766 | - break; |
| 2767 | - |
| 2768 | - case 8: |
| 2769 | - arg_type = long_unsigned_type_node; |
| 2770 | - n = BUILT_IN_CTZL; |
| 2771 | - break; |
| 2772 | - |
| 2773 | - case 16: |
| 2774 | - arg_type = long_long_unsigned_type_node; |
| 2775 | - n = BUILT_IN_CTZLL; |
| 2776 | - break; |
| 2777 | - |
| 2778 | - default: |
| 2779 | - gcc_unreachable (); |
| 2780 | + arg_type = unsigned_type_node; |
| 2781 | + func = built_in_decls[BUILT_IN_CTZ]; |
| 2782 | + } |
| 2783 | + else if (argsize <= LONG_TYPE_SIZE) |
| 2784 | + { |
| 2785 | + arg_type = long_unsigned_type_node; |
| 2786 | + func = built_in_decls[BUILT_IN_CTZL]; |
| 2787 | + } |
| 2788 | + else if (argsize <= LONG_LONG_TYPE_SIZE) |
| 2789 | + { |
| 2790 | + arg_type = long_long_unsigned_type_node; |
| 2791 | + func = built_in_decls[BUILT_IN_CTZLL]; |
| 2792 | + } |
| 2793 | + else |
| 2794 | + { |
| 2795 | + gcc_assert (argsize == 128); |
| 2796 | + arg_type = gfc_build_uint_type (argsize); |
| 2797 | + func = gfor_fndecl_ctz128; |
| 2798 | } |
| 2799 | |
| 2800 | - /* Convert the actual argument to the proper argument type for the built-in |
| 2801 | + /* Convert the actual argument twice: first, to the unsigned type of the |
| 2802 | + same size; then, to the proper argument type for the built-in |
| 2803 | function. But the return type is of the default INTEGER kind. */ |
| 2804 | + arg = fold_convert (gfc_build_uint_type (argsize), arg); |
| 2805 | arg = fold_convert (arg_type, arg); |
| 2806 | result_type = gfc_get_int_type (gfc_default_integer_kind); |
| 2807 | |
| 2808 | /* Compute TRAILZ for the case i .ne. 0. */ |
| 2809 | - trailz = fold_convert (result_type, build_call_expr (built_in_decls[n], 1, arg)); |
| 2810 | + trailz = fold_convert (result_type, build_call_expr (func, 1, arg)); |
| 2811 | |
| 2812 | /* Build BIT_SIZE. */ |
| 2813 | - bit_size = build_int_cst (result_type, gfc_integer_kinds[i].bit_size); |
| 2814 | + bit_size = build_int_cst (result_type, argsize); |
| 2815 | |
| 2816 | - /* ??? For some combinations of targets and integer kinds, the condition |
| 2817 | - can be avoided if CTZ_DEFINED_VALUE_AT_ZERO is used. Later. */ |
| 2818 | cond = fold_build2 (EQ_EXPR, boolean_type_node, |
| 2819 | arg, build_int_cst (arg_type, 0)); |
| 2820 | se->expr = fold_build3 (COND_EXPR, result_type, cond, bit_size, trailz); |
| 2821 | @@ -3129,32 +3125,32 @@ |
| 2868 | diff -Naur gcc-4.4.0.orig/gcc/fortran/trans-stmt.c gcc-4.4.0/gcc/fortran/trans-stmt.c |
| 2869 | --- gcc-4.4.0.orig/gcc/fortran/trans-stmt.c 2009-01-27 10:07:54.000000000 -0800 |
| 2870 | +++ gcc-4.4.0/gcc/fortran/trans-stmt.c 2009-05-10 08:34:55.000000000 -0700 |
| 2871 | @@ -270,9 +270,11 @@ |
| 2872 | gfc_conv_expr_descriptor (&parmse, e, gfc_walk_expr (e)); |
| 2873 | gfc_add_block_to_block (&se->pre, &parmse.pre); |
| 2874 | |
| 2875 | - /* If we've got INTENT(INOUT), initialize the array temporary with |
| 2876 | - a copy of the values. */ |
| 2877 | - if (fsym->attr.intent == INTENT_INOUT) |
| 2878 | + /* If we've got INTENT(INOUT) or a derived type with INTENT(OUT), |
| 2879 | + initialize the array temporary with a copy of the values. */ |
| 2880 | + if (fsym->attr.intent == INTENT_INOUT |
| 2881 | + || (fsym->ts.type ==BT_DERIVED |
| 2882 | + && fsym->attr.intent == INTENT_OUT)) |
| 2883 | initial = parmse.expr; |
| 2884 | else |
| 2885 | initial = NULL_TREE; |
| 2886 | @@ -332,12 +334,16 @@ |
| 2887 | /* Translate the CALL statement. Builds a call to an F95 subroutine. */ |
| 2888 | |
| 2889 | tree |
| 2890 | -gfc_trans_call (gfc_code * code, bool dependency_check) |
| 2891 | +gfc_trans_call (gfc_code * code, bool dependency_check, |
| 2892 | + tree mask, tree count1, bool invert) |
| 2893 | { |
| 2894 | gfc_se se; |
| 2895 | gfc_ss * ss; |
| 2896 | int has_alternate_specifier; |
| 2897 | gfc_dep_check check_variable; |
| 2898 | + tree index = NULL_TREE; |
| 2899 | + tree maskexpr = NULL_TREE; |
| 2900 | + tree tmp; |
| 2901 | |
| 2902 | /* A CALL starts a new block because the actual arguments may have to |
| 2903 | be evaluated first. */ |
| 2904 | @@ -429,10 +435,31 @@ |
| 2905 | gfc_start_scalarized_body (&loop, &body); |
| 2906 | gfc_init_block (&block); |
| 2907 | |
| 2908 | + if (mask && count1) |
| 2909 | + { |
| 2910 | + /* Form the mask expression according to the mask. */ |
| 2911 | + index = count1; |
| 2912 | + maskexpr = gfc_build_array_ref (mask, index, NULL); |
| 2913 | + if (invert) |
| 2914 | + maskexpr = fold_build1 (TRUTH_NOT_EXPR, TREE_TYPE (maskexpr), |
| 2915 | + maskexpr); |
| 2916 | + } |
| 2917 | + |
| 2918 | /* Add the subroutine call to the block. */ |
| 2919 | - gfc_conv_function_call (&loopse, code->resolved_sym, code->ext.actual, |
| 2920 | - NULL_TREE); |
| 2921 | - gfc_add_expr_to_block (&loopse.pre, loopse.expr); |
| 2922 | + gfc_conv_function_call (&loopse, code->resolved_sym, |
| 2923 | + code->ext.actual, NULL_TREE); |
| 2924 | + |
| 2925 | + if (mask && count1) |
| 2926 | + { |
| 2927 | + tmp = build3_v (COND_EXPR, maskexpr, loopse.expr, |
| 2928 | + build_empty_stmt ()); |
| 2929 | + gfc_add_expr_to_block (&loopse.pre, tmp); |
| 2930 | + tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, |
| 2931 | + count1, gfc_index_one_node); |
| 2932 | + gfc_add_modify (&loopse.pre, count1, tmp); |
| 2933 | + } |
| 2934 | + else |
| 2935 | + gfc_add_expr_to_block (&loopse.pre, loopse.expr); |
| 2936 | |
| 2937 | gfc_add_block_to_block (&block, &loopse.pre); |
| 2938 | gfc_add_block_to_block (&block, &loopse.post); |
| 2939 | @@ -2981,7 +3008,7 @@ |
| 2940 | /* Explicit subroutine calls are prevented by the frontend but interface |
| 2941 | assignments can legitimately produce them. */ |
| 2942 | case EXEC_ASSIGN_CALL: |
| 2943 | - assign = gfc_trans_call (c, true); |
| 2944 | + assign = gfc_trans_call (c, true, NULL_TREE, NULL_TREE, false); |
| 2945 | tmp = gfc_trans_nested_forall_loop (nested_forall_info, assign, 1); |
| 2946 | gfc_add_expr_to_block (&block, tmp); |
| 2947 | break; |
| 2948 | @@ -3176,7 +3203,7 @@ |
| 2949 | gfc_trans_where_assign (gfc_expr *expr1, gfc_expr *expr2, |
| 2950 | tree mask, bool invert, |
| 2951 | tree count1, tree count2, |
| 2952 | - gfc_symbol *sym) |
| 2953 | + gfc_code *cnext) |
| 2954 | { |
| 2955 | gfc_se lse; |
| 2956 | gfc_se rse; |
| 2957 | @@ -3190,6 +3217,10 @@ |
| 2958 | stmtblock_t body; |
| 2959 | tree index, maskexpr; |
| 2960 | |
| 2961 | + /* A defined assignment. */ |
| 2962 | + if (cnext && cnext->resolved_sym) |
| 2963 | + return gfc_trans_call (cnext, true, mask, count1, invert); |
| 2964 | + |
| 2965 | #if 0 |
| 2966 | /* TODO: handle this special case. |
| 2967 | Special case a single function returning an array. */ |
| 2968 | @@ -3291,11 +3322,8 @@ |
| 2969 | maskexpr = fold_build1 (TRUTH_NOT_EXPR, TREE_TYPE (maskexpr), maskexpr); |
| 2970 | |
| 2971 | /* Use the scalar assignment as is. */ |
| 2972 | - if (sym == NULL) |
| 2973 | - tmp = gfc_trans_scalar_assign (&lse, &rse, expr1->ts, |
| 2974 | - loop.temp_ss != NULL, false); |
| 2975 | - else |
| 2976 | - tmp = gfc_conv_operator_assign (&lse, &rse, sym); |
| 2977 | + tmp = gfc_trans_scalar_assign (&lse, &rse, expr1->ts, |
| 2978 | + loop.temp_ss != NULL, false); |
| 2979 | |
| 2980 | tmp = build3_v (COND_EXPR, maskexpr, tmp, build_empty_stmt ()); |
| 2981 | |
| 2982 | @@ -3562,7 +3590,7 @@ |
| 2983 | tmp = gfc_trans_where_assign (expr1, expr2, |
| 2984 | cmask, invert, |
| 2985 | count1, count2, |
| 2986 | - cnext->resolved_sym); |
| 2987 | + cnext); |
| 2988 | |
| 2989 | tmp = gfc_trans_nested_forall_loop (nested_forall_info, |
| 2990 | tmp, 1); |
| 2991 | @@ -3580,7 +3608,7 @@ |
| 2992 | tmp = gfc_trans_where_assign (expr1, expr2, |
| 2993 | cmask, invert, |
| 2994 | count1, count2, |
| 2995 | - cnext->resolved_sym); |
| 2996 | + cnext); |
| 2997 | gfc_add_expr_to_block (block, tmp); |
| 2998 | |
| 2999 | } |
| 3000 | diff -Naur gcc-4.4.0.orig/gcc/fortran/trans-stmt.h gcc-4.4.0/gcc/fortran/trans-stmt.h |
| 3001 | --- gcc-4.4.0.orig/gcc/fortran/trans-stmt.h 2008-04-05 15:23:27.000000000 -0700 |
| 3002 | +++ gcc-4.4.0/gcc/fortran/trans-stmt.h 2009-05-10 08:34:55.000000000 -0700 |
| 3003 | @@ -39,7 +39,7 @@ |
| 3004 | tree gfc_trans_entry (gfc_code *); |
| 3005 | tree gfc_trans_pause (gfc_code *); |
| 3006 | tree gfc_trans_stop (gfc_code *); |
| 3007 | -tree gfc_trans_call (gfc_code *, bool); |
| 3008 | +tree gfc_trans_call (gfc_code *, bool, tree, tree, bool); |
| 3009 | tree gfc_trans_return (gfc_code *); |
| 3010 | tree gfc_trans_if (gfc_code *); |
| 3011 | tree gfc_trans_arithmetic_if (gfc_code *); |
| 3012 | diff -Naur gcc-4.4.0.orig/gcc/fortran/trans-types.c gcc-4.4.0/gcc/fortran/trans-types.c |
| 3013 | --- gcc-4.4.0.orig/gcc/fortran/trans-types.c 2009-03-30 07:53:17.000000000 -0700 |
| 3014 | +++ gcc-4.4.0/gcc/fortran/trans-types.c 2009-06-03 12:39:09.000000000 -0700 |
| 3015 | @@ -595,7 +595,7 @@ |
| 3016 | return make_signed_type (mode_precision); |
| 3017 | } |
| 3018 | |
| 3019 | -static tree |
| 3020 | +tree |
| 3021 | gfc_build_uint_type (int size) |
| 3022 | { |
| 3023 | if (size == CHAR_TYPE_SIZE) |
| 3024 | diff -Naur gcc-4.4.0.orig/gcc/fortran/trans-types.h gcc-4.4.0/gcc/fortran/trans-types.h |
| 3025 | --- gcc-4.4.0.orig/gcc/fortran/trans-types.h 2008-05-18 15:45:05.000000000 -0700 |
| 3026 | +++ gcc-4.4.0/gcc/fortran/trans-types.h 2009-06-03 12:39:09.000000000 -0700 |
| 3027 | @@ -68,6 +68,7 @@ |
| 3028 | |
| 3029 | tree gfc_type_for_size (unsigned, int); |
| 3030 | tree gfc_type_for_mode (enum machine_mode, int); |
| 3031 | +tree gfc_build_uint_type (int); |
| 3032 | |
| 3033 | tree gfc_get_element_type (tree); |
| 3034 | tree gfc_get_array_type_bounds (tree, int, tree *, tree *, int, |
| 3185 | diff -Naur gcc-4.4.0.orig/gcc/gimple.h gcc-4.4.0/gcc/gimple.h |
| 3186 | --- gcc-4.4.0.orig/gcc/gimple.h 2009-02-20 07:20:38.000000000 -0800 |
| 3187 | +++ gcc-4.4.0/gcc/gimple.h 2009-05-18 03:13:43.000000000 -0700 |
| 3188 | @@ -1394,35 +1394,6 @@ |
| 3189 | return (gimple_has_ops (g)) ? (bool) g->gsbase.modified : false; |
| 3190 | } |
| 3191 | |
| 3192 | -/* Return the type of the main expression computed by STMT. Return |
| 3193 | - void_type_node if the statement computes nothing. */ |
| 3194 | - |
| 3195 | -static inline tree |
| 3196 | -gimple_expr_type (const_gimple stmt) |
| 3197 | -{ |
| 3198 | - enum gimple_code code = gimple_code (stmt); |
| 3199 | - |
| 3200 | - if (code == GIMPLE_ASSIGN || code == GIMPLE_CALL) |
| 3201 | - { |
| 3202 | - tree type = TREE_TYPE (gimple_get_lhs (stmt)); |
| 3203 | - /* Integral sub-types are never the type of the expression, |
| 3204 | - but they still can be the type of the result as the base |
| 3205 | - type (in which expressions are computed) is trivially |
| 3206 | - convertible to one of its sub-types. So always return |
| 3207 | - the base type here. */ |
| 3208 | - if (INTEGRAL_TYPE_P (type) |
| 3209 | - && TREE_TYPE (type) |
| 3210 | - /* But only if they are trivially convertible. */ |
| 3211 | - && useless_type_conversion_p (type, TREE_TYPE (type))) |
| 3212 | - type = TREE_TYPE (type); |
| 3213 | - return type; |
| 3214 | - } |
| 3215 | - else if (code == GIMPLE_COND) |
| 3216 | - return boolean_type_node; |
| 3217 | - else |
| 3218 | - return void_type_node; |
| 3219 | -} |
| 3220 | - |
| 3221 | |
| 3222 | /* Return the tree code for the expression computed by STMT. This is |
| 3223 | only valid for GIMPLE_COND, GIMPLE_CALL and GIMPLE_ASSIGN. For |
| 3224 | @@ -4285,6 +4256,55 @@ |
| 3225 | } |
| 3226 | |
| 3227 | |
| 3228 | +/* Return the type of the main expression computed by STMT. Return |
| 3229 | + void_type_node if the statement computes nothing. */ |
| 3230 | + |
| 3231 | +static inline tree |
| 3232 | +gimple_expr_type (const_gimple stmt) |
| 3233 | +{ |
| 3234 | + enum gimple_code code = gimple_code (stmt); |
| 3235 | + |
| 3236 | + if (code == GIMPLE_ASSIGN || code == GIMPLE_CALL) |
| 3237 | + { |
| 3238 | + tree type; |
| 3239 | + /* In general we want to pass out a type that can be substituted |
| 3240 | + for both the RHS and the LHS types if there is a possibly |
| 3241 | + useless conversion involved. That means returning the |
| 3242 | + original RHS type as far as we can reconstruct it. */ |
| 3243 | + if (code == GIMPLE_CALL) |
| 3244 | + type = gimple_call_return_type (stmt); |
| 3245 | + else |
| 3246 | + switch (gimple_assign_rhs_code (stmt)) |
| 3247 | + { |
| 3248 | + case POINTER_PLUS_EXPR: |
| 3249 | + type = TREE_TYPE (gimple_assign_rhs1 (stmt)); |
| 3250 | + break; |
| 3251 | + |
| 3252 | + default: |
| 3253 | + /* As fallback use the type of the LHS. */ |
| 3254 | + type = TREE_TYPE (gimple_get_lhs (stmt)); |
| 3255 | + break; |
| 3256 | + } |
| 3257 | + |
| 3258 | + /* Integral sub-types are never the type of the expression, |
| 3259 | + but they still can be the type of the result as the base |
| 3260 | + type (in which expressions are computed) is trivially |
| 3261 | + convertible to one of its sub-types. So always return |
| 3262 | + the base type here. */ |
| 3263 | + if (INTEGRAL_TYPE_P (type) |
| 3264 | + && TREE_TYPE (type) |
| 3265 | + /* But only if they are trivially convertible. */ |
| 3266 | + && useless_type_conversion_p (type, TREE_TYPE (type))) |
| 3267 | + type = TREE_TYPE (type); |
| 3268 | + return type; |
| 3269 | + } |
| 3270 | + else if (code == GIMPLE_COND) |
| 3271 | + return boolean_type_node; |
| 3272 | + else |
| 3273 | + return void_type_node; |
| 3274 | +} |
| 3275 | + |
| 3276 | + |
| 3277 | /* Return a new iterator pointing to GIMPLE_SEQ's first statement. */ |
| 3278 | |
| 3279 | static inline gimple_stmt_iterator |
| 3280 | diff -Naur gcc-4.4.0.orig/gcc/gimplify.c gcc-4.4.0/gcc/gimplify.c |
| 3281 | --- gcc-4.4.0.orig/gcc/gimplify.c 2009-03-11 18:02:16.000000000 -0700 |
| 3282 | +++ gcc-4.4.0/gcc/gimplify.c 2009-05-12 09:19:29.000000000 -0700 |
| 3283 | @@ -1628,20 +1628,63 @@ |
| 3284 | } |
| 3285 | len = i; |
| 3286 | |
| 3287 | + if (!VEC_empty (tree, labels)) |
| 3288 | + sort_case_labels (labels); |
| 3289 | + |
| 3290 | if (!default_case) |
| 3291 | { |
| 3292 | - gimple new_default; |
| 3293 | + tree type = TREE_TYPE (switch_expr); |
| 3294 | |
| 3295 | /* If the switch has no default label, add one, so that we jump |
| 3296 | - around the switch body. */ |
| 3297 | - default_case = build3 (CASE_LABEL_EXPR, void_type_node, NULL_TREE, |
| 3298 | - NULL_TREE, create_artificial_label ()); |
| 3299 | - new_default = gimple_build_label (CASE_LABEL (default_case)); |
| 3300 | - gimplify_seq_add_stmt (&switch_body_seq, new_default); |
| 3301 | - } |
| 3302 | + around the switch body. If the labels already cover the whole |
| 3303 | + range of type, add the default label pointing to one of the |
| 3304 | + existing labels. */ |
| 3305 | + if (type == void_type_node) |
| 3306 | + type = TREE_TYPE (SWITCH_COND (switch_expr)); |
| 3307 | + if (len |
| 3308 | + && INTEGRAL_TYPE_P (type) |
| 3309 | + && TYPE_MIN_VALUE (type) |
| 3310 | + && TYPE_MAX_VALUE (type) |
| 3311 | + && tree_int_cst_equal (CASE_LOW (VEC_index (tree, labels, 0)), |
| 3312 | + TYPE_MIN_VALUE (type))) |
| 3313 | + { |
| 3314 | + tree low, high = CASE_HIGH (VEC_index (tree, labels, len - 1)); |
| 3315 | + if (!high) |
| 3316 | + high = CASE_LOW (VEC_index (tree, labels, len - 1)); |
| 3317 | + if (tree_int_cst_equal (high, TYPE_MAX_VALUE (type))) |
| 3318 | + { |
| 3319 | + for (i = 1; i < len; i++) |
| 3320 | + { |
| 3321 | + high = CASE_LOW (VEC_index (tree, labels, i)); |
| 3322 | + low = CASE_HIGH (VEC_index (tree, labels, i - 1)); |
| 3323 | + if (!low) |
| 3324 | + low = CASE_LOW (VEC_index (tree, labels, i - 1)); |
| 3325 | + if ((TREE_INT_CST_LOW (low) + 1 |
| 3326 | + != TREE_INT_CST_LOW (high)) |
| 3327 | + || (TREE_INT_CST_HIGH (low) |
| 3328 | + + (TREE_INT_CST_LOW (high) == 0) |
| 3329 | + != TREE_INT_CST_HIGH (high))) |
| 3330 | + break; |
| 3331 | + } |
| 3332 | + if (i == len) |
| 3333 | + default_case = build3 (CASE_LABEL_EXPR, void_type_node, |
| 3334 | + NULL_TREE, NULL_TREE, |
| 3335 | + CASE_LABEL (VEC_index (tree, |
| 3336 | + labels, 0))); |
| 3337 | + } |
| 3338 | + } |
| 3339 | |
| 3340 | - if (!VEC_empty (tree, labels)) |
| 3341 | - sort_case_labels (labels); |
| 3342 | + if (!default_case) |
| 3343 | + { |
| 3344 | + gimple new_default; |
| 3345 | + |
| 3346 | + default_case = build3 (CASE_LABEL_EXPR, void_type_node, |
| 3347 | + NULL_TREE, NULL_TREE, |
| 3348 | + create_artificial_label ()); |
| 3349 | + new_default = gimple_build_label (CASE_LABEL (default_case)); |
| 3350 | + gimplify_seq_add_stmt (&switch_body_seq, new_default); |
| 3351 | + } |
| 3352 | + } |
| 3353 | |
| 3354 | gimple_switch = gimple_build_switch_vec (SWITCH_COND (switch_expr), |
| 3355 | default_case, labels); |
| 3356 | diff -Naur gcc-4.4.0.orig/gcc/ipa-utils.h gcc-4.4.0/gcc/ipa-utils.h |
| 3357 | --- gcc-4.4.0.orig/gcc/ipa-utils.h 2007-07-26 01:37:01.000000000 -0700 |
| 3358 | +++ gcc-4.4.0/gcc/ipa-utils.h 2009-05-14 08:52:58.000000000 -0700 |
| 3359 | @@ -23,9 +23,6 @@ |
| 3360 | #include "tree.h" |
| 3361 | #include "cgraph.h" |
| 3362 | |
| 3363 | -/* Used for parsing attributes of asm code. */ |
| 3364 | -extern tree memory_identifier_string; |
| 3365 | - |
| 3366 | struct ipa_dfs_info { |
| 3367 | int dfn_number; |
| 3368 | int low_link; |
| 14966 | diff -Naur gcc-4.4.0.orig/gcc/reg-stack.c gcc-4.4.0/gcc/reg-stack.c |
| 14967 | --- gcc-4.4.0.orig/gcc/reg-stack.c 2009-02-20 07:20:38.000000000 -0800 |
| 14968 | +++ gcc-4.4.0/gcc/reg-stack.c 2009-05-22 11:59:30.000000000 -0700 |
| 14969 | @@ -1371,21 +1371,23 @@ |
| 14970 | |
| 14971 | if (pat != PATTERN (insn)) |
| 14972 | { |
| 14973 | - /* The fix_truncdi_1 pattern wants to be able to allocate |
| 14974 | - its own scratch register. It does this by clobbering |
| 14975 | - an fp reg so that it is assured of an empty reg-stack |
| 14976 | - register. If the register is live, kill it now. |
| 14977 | - Remove the DEAD/UNUSED note so we don't try to kill it |
| 14978 | - later too. */ |
| 14979 | + /* The fix_truncdi_1 pattern wants to be able to |
| 14980 | + allocate its own scratch register. It does this by |
| 14981 | + clobbering an fp reg so that it is assured of an |
| 14982 | + empty reg-stack register. If the register is live, |
| 14983 | + kill it now. Remove the DEAD/UNUSED note so we |
| 14984 | + don't try to kill it later too. |
| 14985 | + |
| 14986 | + In reality the UNUSED note can be absent in some |
| 14987 | + complicated cases when the register is reused for |
| 14988 | + partially set variable. */ |
| 14989 | |
| 14990 | if (note) |
| 14991 | emit_pop_insn (insn, regstack, *dest, EMIT_BEFORE); |
| 14992 | else |
| 14993 | - { |
| 14994 | - note = find_reg_note (insn, REG_UNUSED, *dest); |
| 14995 | - gcc_assert (note); |
| 14996 | - } |
| 14997 | - remove_note (insn, note); |
| 14998 | + note = find_reg_note (insn, REG_UNUSED, *dest); |
| 14999 | + if (note) |
| 15000 | + remove_note (insn, note); |
| 15001 | replace_reg (dest, FIRST_STACK_REG + 1); |
| 15002 | } |
| 15003 | else |
| 15004 | diff -Naur gcc-4.4.0.orig/gcc/resource.c gcc-4.4.0/gcc/resource.c |
| 15005 | --- gcc-4.4.0.orig/gcc/resource.c 2009-02-20 07:20:38.000000000 -0800 |
| 15006 | +++ gcc-4.4.0/gcc/resource.c 2009-05-21 16:17:37.000000000 -0700 |
| 15007 | @@ -135,8 +135,6 @@ |
| 15008 | static int |
| 15009 | find_basic_block (rtx insn, int search_limit) |
| 15010 | { |
| 15011 | - basic_block bb; |
| 15012 | - |
| 15013 | /* Scan backwards to the previous BARRIER. Then see if we can find a |
| 15014 | label that starts a basic block. Return the basic block number. */ |
| 15015 | for (insn = prev_nonnote_insn (insn); |
| 15016 | @@ -157,11 +155,8 @@ |
| 15017 | for (insn = next_nonnote_insn (insn); |
| 15018 | insn && LABEL_P (insn); |
| 15019 | insn = next_nonnote_insn (insn)) |
| 15020 | - { |
| 15021 | - FOR_EACH_BB (bb) |
| 15022 | - if (insn == BB_HEAD (bb)) |
| 15023 | - return bb->index; |
| 15024 | - } |
| 15025 | + if (BLOCK_FOR_INSN (insn)) |
| 15026 | + return BLOCK_FOR_INSN (insn)->index; |
| 15027 | |
| 15028 | return -1; |
| 15029 | } |
| 15030 | @@ -848,13 +843,12 @@ |
| 15031 | (with no intervening active insns) to see if any of them start a basic |
| 15032 | block. If we hit the start of the function first, we use block 0. |
| 15033 | |
| 15034 | - Once we have found a basic block and a corresponding first insns, we can |
| 15035 | - accurately compute the live status from basic_block_live_regs and |
| 15036 | - reg_renumber. (By starting at a label following a BARRIER, we are immune |
| 15037 | - to actions taken by reload and jump.) Then we scan all insns between |
| 15038 | - that point and our target. For each CLOBBER (or for call-clobbered regs |
| 15039 | - when we pass a CALL_INSN), mark the appropriate registers are dead. For |
| 15040 | - a SET, mark them as live. |
| 15041 | + Once we have found a basic block and a corresponding first insn, we can |
| 15042 | + accurately compute the live status (by starting at a label following a |
| 15043 | + BARRIER, we are immune to actions taken by reload and jump.) Then we |
| 15044 | + scan all insns between that point and our target. For each CLOBBER (or |
| 15045 | + for call-clobbered regs when we pass a CALL_INSN), mark the appropriate |
| 15046 | + registers are dead. For a SET, mark them as live. |
| 15047 | |
| 15048 | We have to be careful when using REG_DEAD notes because they are not |
| 15049 | updated by such things as find_equiv_reg. So keep track of registers |
| 15050 | @@ -954,13 +948,10 @@ |
| 15051 | TARGET. Otherwise, we must assume everything is live. */ |
| 15052 | if (b != -1) |
| 15053 | { |
| 15054 | - regset regs_live = DF_LR_IN (BASIC_BLOCK (b)); |
| 15055 | + regset regs_live = df_get_live_in (BASIC_BLOCK (b)); |
| 15056 | rtx start_insn, stop_insn; |
| 15057 | |
| 15058 | - /* Compute hard regs live at start of block -- this is the real hard regs |
| 15059 | - marked live, plus live pseudo regs that have been renumbered to |
| 15060 | - hard regs. */ |
| 15061 | - |
| 15062 | + /* Compute hard regs live at start of block. */ |
| 15063 | REG_SET_TO_HARD_REG_SET (current_live_regs, regs_live); |
| 15064 | |
| 15065 | /* Get starting and ending insn, handling the case where each might |
| 15066 | @@ -1046,10 +1037,24 @@ |
| 15067 | |
| 15068 | else if (LABEL_P (real_insn)) |
| 15069 | { |
| 15070 | + basic_block bb; |
| 15071 | + |
| 15072 | /* A label clobbers the pending dead registers since neither |
| 15073 | reload nor jump will propagate a value across a label. */ |
| 15074 | AND_COMPL_HARD_REG_SET (current_live_regs, pending_dead_regs); |
| 15075 | CLEAR_HARD_REG_SET (pending_dead_regs); |
| 15076 | + |
| 15077 | + /* We must conservatively assume that all registers that used |
| 15078 | + to be live here still are. The fallthrough edge may have |
| 15079 | + left a live register uninitialized. */ |
| 15080 | + bb = BLOCK_FOR_INSN (real_insn); |
| 15081 | + if (bb) |
| 15082 | + { |
| 15083 | + HARD_REG_SET extra_live; |
| 15084 | + |
| 15085 | + REG_SET_TO_HARD_REG_SET (extra_live, df_get_live_in (bb)); |
| 15086 | + IOR_HARD_REG_SET (current_live_regs, extra_live); |
| 15087 | + } |
| 15088 | } |
| 15089 | |
| 15090 | /* The beginning of the epilogue corresponds to the end of the |
| 15091 | @@ -1121,6 +1126,7 @@ |
| 15092 | init_resource_info (rtx epilogue_insn) |
| 15093 | { |
| 15094 | int i; |
| 15095 | + basic_block bb; |
| 15096 | |
| 15097 | /* Indicate what resources are required to be valid at the end of the current |
| 15098 | function. The condition code never is and memory always is. If the |
| 15099 | @@ -1189,6 +1195,11 @@ |
| 15100 | /* Allocate and initialize the tables used by mark_target_live_regs. */ |
| 15101 | target_hash_table = XCNEWVEC (struct target_info *, TARGET_HASH_PRIME); |
| 15102 | bb_ticks = XCNEWVEC (int, last_basic_block); |
| 15103 | + |
| 15104 | + /* Set the BLOCK_FOR_INSN of each label that starts a basic block. */ |
| 15105 | + FOR_EACH_BB (bb) |
| 15106 | + if (LABEL_P (BB_HEAD (bb))) |
| 15107 | + BLOCK_FOR_INSN (BB_HEAD (bb)) = bb; |
| 15108 | } |
| 15109 | |
| 15110 | |
| 15111 | /* Free up the resources allocated to mark_target_live_regs (). This |
| 15112 | @@ -1197,6 +1208,8 @@ |
| 15113 | void |
| 15114 | free_resource_info (void) |
| 15115 | { |
| 15116 | + basic_block bb; |
| 15117 | + |
| 15118 | if (target_hash_table != NULL) |
| 15119 | { |
| 15120 | int i; |
| 15121 | @@ -1222,6 +1235,10 @@ |
| 15122 | free (bb_ticks); |
| 15123 | bb_ticks = NULL; |
| 15124 | } |
| 15125 | + |
| 15126 | + FOR_EACH_BB (bb) |
| 15127 | + if (LABEL_P (BB_HEAD (bb))) |
| 15128 | + BLOCK_FOR_INSN (BB_HEAD (bb)) = NULL; |
| 15129 | } |
| 15130 | |
| 15131 | |
| 15132 | /* Clear any hashed information that we have stored for INSN. */ |
13085 | | diff -Naur gcc-4.4.0.orig/gcc/testsuite/ChangeLog gcc-4.4.0/gcc/testsuite/ChangeLog |
13086 | | --- gcc-4.4.0.orig/gcc/testsuite/ChangeLog 2009-04-21 01:44:06.000000000 -0700 |
13087 | | +++ gcc-4.4.0/gcc/testsuite/ChangeLog 2009-04-29 08:54:18.000000000 -0700 |
13088 | | @@ -1,3 +1,183 @@ |
13089 | | +2009-04-29 H.J. Lu <hongjiu.lu@intel.com> |
13090 | | + |
13091 | | + Backport from mainline: |
13092 | | + 2009-04-29 Richard Guenther <rguenther@suse.de> |
13093 | | + |
13094 | | + PR middle-end/39937 |
13095 | | + * gcc.c-torture/compile/pr39937.c: New testcase. |
13096 | | + |
13097 | | +2009-04-29 H.J. Lu <hongjiu.lu@intel.com> |
13098 | | + |
13099 | | + Backport from mainline: |
13100 | | + 2009-04-29 Richard Guenther <rguenther@suse.de> |
13101 | | + |
13102 | | + PR tree-optimization/39941 |
13103 | | + * gcc.c-torture/compile/pr39941.c: New testcase. |
13104 | | + |
13105 | | + 2009-04-29 Anmol P. Paralkar <anmol@freescale.com> |
13106 | | + |
13107 | | + PR target/39565 |
13108 | | + * gcc.dg/pr39565.c: New testcase. |
13109 | | + |
13110 | | + 2009-04-28 Richard Guenther <rguenther@suse.de> |
13111 | | + |
13112 | | + PR middle-end/39937 |
13113 | | + * gfortran.fortran-torture/compile/pr39937.f: New testcase. |
13114 | | + |
13115 | | +2009-04-28 Jing Yu <jingyu@google.com> |
13116 | | + |
13117 | | + Backport from mainline: |
13118 | | + 2009-04-28 Jing Yu <jingyu@google.com> |
13119 | | + |
13120 | | + PR testsuite/39790 |
13121 | | + * lib/target-supports.exp (check_effective_target_tls): Remove |
13122 | | + comment of caching. |
13123 | | + (check_effective_target_tls_native): Likewise. |
13124 | | + (check_effective_target_tls_runtime): Likewise. |
13125 | | + * gcc.dg/tls/alias-1.c (dg-require-effective-target): Change target |
13126 | | + tls to tls_runtime. |
13127 | | + * gcc.dg/tls/opt-2.c: Add dg-require-effective-target tls_runtime. |
13128 | | + |
13129 | | +2009-04-28 Michael Meissner <meissner@linux.vnet.ibm.com> |
13130 | | + |
13131 | | + Backport from mainline: |
13132 | | + PR testsuite/39769 |
13133 | | + * gcc.dg/vmx/3a-04.c (test): Don't rely on floating point equality |
13134 | | + for testing the results of estimate instructions. |
13135 | | + * gcc.dg/vmx/3a-04m.c (test): Ditto. |
13136 | | + * gcc.dg/vmx/3a-05.c (test): Ditto. |
13137 | | + |
13138 | | +2009-04-28 H.J. Lu <hongjiu.lu@intel.com> |
13139 | | + |
13140 | | + Backport from mainline: |
13141 | | + 2009-04-27 H.J. Lu <hongjiu.lu@intel.com> |
13142 | | + |
13143 | | + PR target/39903 |
13144 | | + * gcc.dg/torture/pr39903-1.c: New. |
13145 | | + * gcc.dg/torture/pr39903-2.c: Likewise. |
13146 | | + |
13147 | | +2009-04-27 Jakub Jelinek <jakub@redhat.com> |
13148 | | + |
13149 | | + PR rtl-optimization/39794 |
13150 | | + * gcc.dg/pr39794.c: New test. |
13151 | | + |
13152 | | +2009-04-26 Jakub Jelinek <jakub@redhat.com> |
13153 | | + |
13154 | | + PR inline-asm/39543 |
13155 | | + * gcc.target/i386/pr39543-1.c: New test. |
13156 | | + * gcc.target/i386/pr39543-2.c: New test. |
13157 | | + * gcc.target/i386/pr39543-3.c: New test. |
13158 | | + |
13159 | | + PR c/39889 |
13160 | | + * gcc.dg/Wunused-value-3.c: New test. |
13161 | | + |
13162 | | +2009-04-24 Paolo Bonzini <bonzini@gnu.org> |
13163 | | + |
13164 | | + PR middle-end/39867 |
13165 | | + * gcc.dg/pr39867.c: New. |
13166 | | + |
13167 | | +2009-04-23 Dodji Seketeli <dodji@redhat.com> |
13168 | | + |
13169 | | + PR c++/38228 |
13170 | | + * g++.dg/expr/bound-mem-fun.C: New test. |
13171 | | + |
13172 | | +2009-04-22 Eric Botcazou <ebotcazou@adacore.com> |
13173 | | + |
13174 | | + * gnat.dg/enum2.adb: New test. |
13175 | | + * gnat.dg/enum2_pkg.ads: New helper. |
13176 | | + |
13177 | | +2009-04-22 Jakub Jelinek <jakub@redhat.com> |
13178 | | + |
13179 | | + PR c/39855 |
13180 | | + * gcc.dg/torture/pr39855.c: New test. |
13181 | | + |
13182 | | +2009-04-22 Richard Guenther <rguenther@suse.de> |
13183 | | + |
13184 | | + PR tree-optimization/39824 |
13185 | | + * gcc.c-torture/compile/pr39824.c: New testcase. |
13186 | | + |
13187 | | +2009-04-22 Dodji Seketeli <dodji@redhat.com> |
13188 | | + |
13189 | | + PR c++/39639 |
13190 | | + * g++.dg/cpp0x/pr39639.C: New test. |
13191 | | + |
13192 | | +2009-04-22 H.J. Lu <hongjiu.lu@intel.com> |
13193 | | + |
13194 | | + Backport from mainline: |
13195 | | + 2009-04-22 Richard Guenther <rguenther@suse.de> |
13196 | | + |
13197 | | + PR tree-optimization/39845 |
13198 | | + * gcc.c-torture/compile/pr39845.c: New testcase. |
13199 | | + |
13200 | | + 2009-04-21 Richard Guenther <rguenther@suse.de> |
13201 | | + |
13202 | | + PR middle-end/39829 |
13203 | | + * gcc.dg/torture/pr39829.c: New testcase. |
13204 | | + |
13205 | | +2009-04-12 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> |
13206 | | + |
13207 | | + Backport from mainline: |
13208 | | + |
13209 | | + 2009-04-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> |
13210 | | + |
13211 | | + * gfortran.fortran-torture/execute/getarg_1.x: New file. |
13212 | | + |
13213 | | + 2009-04-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> |
13214 | | + |
13215 | | + * gfortran.dg/vect/pr39318.f90: Guard with "target fopenmp". |
13216 | | + |
13217 | | + 2009-04-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> |
13218 | | + |
13219 | | + * gfortran.dg/chmod_1.f90: Disable on spu-*-* targets. |
13220 | | + * gfortran.dg/chmod_2.f90: Likewise. |
13221 | | + * gfortran.dg/chmod_3.f90: Likewise. |
13222 | | + * gfortran.dg/open_errors.f90: Likewise. |
13223 | | + * gfortran.dg/stat_1.f90: Likewise. |
13224 | | + * gfortran.dg/stat_2.f90: Likewise. |
13225 | | + |
13226 | | + 2009-04-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> |
13227 | | + |
13228 | | + * gfortran.fortran-torture/execute/nan_inf_fmt.x: Skip on spu-*-*. |
13229 | | + * gfortran.fortran-torture/execute/intrinsic_nearest.x: Likewise. |
13230 | | + * gfortran.fortran-torture/execute/intrinsic_set_exponent.x: Likewise. |
13231 | | + * gfortran.dg/nearest_1.f90: Likewise. |
13232 | | + * gfortran.dg/nearest_3.f90: Likewise. |
13233 | | + * gfortran.dg/isnan_1.f90: Likewise. |
13234 | | + * gfortran.dg/isnan_2.f90: Likewise. |
13235 | | + * gfortran.dg/nan_1.f90: Likewise. |
13236 | | + * gfortran.dg/nan_2.f90: Likewise. |
13237 | | + * gfortran.dg/nan_3.f90: Likewise. |
13238 | | + * gfortran.dg/nan_4.f90: Likewise. |
13239 | | + * gfortran.dg/module_nan.f90: Likewise. |
13240 | | + * gfortran.dg/int_conv_2.f90: Likewise. |
13241 | | + * gfortran.dg/init_flag_3.f90: Likewise. |
13242 | | + * gfortran.dg/namelist_42.f90: Likewise. |
13243 | | + * gfortran.dg/namelist_43.f90: Likewise. |
13244 | | + * gfortran.dg/real_const_3.f90: Likewise. |
13245 | | + * gfortran.dg/transfer_simplify_1.f90: Likewise. |
13246 | | + |
13247 | | + * gfortran.dg/default_format_1.f90: XFAIL on spu-*-*. |
13248 | | + * gfortran.dg/default_format_denormal_1.f90: XFAIL on spu-*-*. |
13249 | | + * gfortran.dg/scalar_mask_2.f90: XFAIL on spu-*-*. |
13250 | | + * gfortran.dg/integer_exponentiation_3.F90: XFAIL on spu-*-*. |
13251 | | + * gfortran.dg/integer_exponentiation_5.F90: XFAIL on spu-*-*. |
13252 | | + |
13253 | | + * gfortran.dg/elemental_subroutine_1.f90: Relax "epsilon" check. |
13254 | | + * gfortran.dg/gamma_5.f90: Likewise. |
13255 | | + |
13256 | | + 2009-04-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> |
13257 | | + |
13258 | | + * lib/gcc-dg.exp (gcc-dg-prune): Make linker message check |
13259 | | + less strict so it also works with auto-overlay support. |
13260 | | + * lib/gcc-defs.exp (${tool}_check_unsupported_p): Add check |
13261 | | + for "exceeds local store" linker errors on the SPU. |
13262 | | + |
13263 | | + * lib/gfortran.exp: Include target-supports.exp. |
13264 | | + (gfortran_init): On SPU targets where automatic overlay support |
13265 | | + is available, use it to build all Fortran test cases. |
13266 | | + |
13267 | | + * gfortran.dg/pr20257.f90: Skip on spu-*-* targets. |
13268 | | + |
13269 | | 2009-04-21 Release Manager |
13270 | | |
13271 | | * GCC 4.4.0 released. |
| 15156 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20000211-1.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20000211-1.c |
| 15157 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20000211-1.c 2000-02-11 11:36:25.000000000 -0800 |
| 15158 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20000211-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 15159 | @@ -1,4 +1,4 @@ |
| 15160 | -typedef long unsigned int size_t; |
| 15161 | +typedef __SIZE_TYPE__ size_t; |
| 15162 | typedef unsigned char Bufbyte; |
| 15163 | typedef int Bytecount; |
| 15164 | typedef int Charcount; |
| 15165 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20010328-1.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20010328-1.c |
| 15166 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20010328-1.c 2001-03-28 09:46:52.000000000 -0800 |
| 15167 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20010328-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 15168 | @@ -1,4 +1,4 @@ |
| 15169 | -typedef unsigned int size_t; |
| 15170 | +typedef __SIZE_TYPE__ size_t; |
| 15171 | typedef unsigned int __u_int; |
| 15172 | typedef unsigned long __u_long; |
| 15173 | |
| 15174 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20030320-1.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20030320-1.c |
| 15175 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20030320-1.c 2003-03-20 16:13:41.000000000 -0800 |
| 15176 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20030320-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 15177 | @@ -2,7 +2,7 @@ |
| 15178 | conditional returns without updating dominance info. |
| 15179 | Extracted from glibc's dl-load.c. */ |
| 15180 | |
| 15181 | -typedef unsigned long size_t; |
| 15182 | +typedef __SIZE_TYPE__ size_t; |
| 15183 | |
| 15184 | static size_t |
| 15185 | is_dst (const char *start, const char *name, const char *str, |
| 15186 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20030405-1.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20030405-1.c |
| 15187 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20030405-1.c 2004-05-12 23:41:07.000000000 -0700 |
| 15188 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20030405-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 15189 | @@ -6,7 +6,7 @@ |
| 15190 | and when the PHI node at the end of the while() is visited the first |
| 15191 | time, CCP will try to assign it a value of UNDEFINED, but the default |
| 15192 | value for *str is a constant. */ |
| 15193 | -typedef unsigned int size_t; |
| 15194 | +typedef __SIZE_TYPE__ size_t; |
| 15195 | size_t strlength (const char * const); |
| 15196 | char foo(); |
| 15197 | |
| 15198 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20030902-1.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20030902-1.c |
| 15199 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20030902-1.c 2004-05-12 23:41:07.000000000 -0700 |
| 15200 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20030902-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 15201 | @@ -1,4 +1,4 @@ |
| 15202 | -typedef unsigned int size_t; |
| 15203 | +typedef __SIZE_TYPE__ size_t; |
| 15204 | typedef unsigned long int reg_syntax_t; |
| 15205 | struct re_pattern_buffer |
| 15206 | { |
| 15207 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20060202-1.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20060202-1.c |
| 15208 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20060202-1.c 2006-02-02 16:24:50.000000000 -0800 |
| 15209 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20060202-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 15210 | @@ -1,4 +1,4 @@ |
| 15211 | -typedef unsigned int size_t; |
| 15212 | +typedef __SIZE_TYPE__ size_t; |
| 15213 | typedef const struct objc_selector |
| 15214 | { |
| 15215 | void *sel_id; |
| 15216 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20080613-1.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20080613-1.c |
| 15217 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20080613-1.c 2008-06-13 03:20:57.000000000 -0700 |
| 15218 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20080613-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 15219 | @@ -1,7 +1,7 @@ |
| 15220 | /* PR middle-end/36520 */ |
| 15221 | /* Testcase by Richard Guenther <rguenth@gcc.gnu.org> */ |
| 15222 | |
| 15223 | -typedef long unsigned int size_t; |
| 15224 | +typedef __SIZE_TYPE__ size_t; |
| 15225 | typedef unsigned short int sa_family_t; |
| 15226 | struct cmsghdr { |
| 15227 | size_t cmsg_len; |
| 15228 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20090519-1.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20090519-1.c |
| 15229 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/20090519-1.c 1969-12-31 16:00:00.000000000 -0800 |
| 15230 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/20090519-1.c 2009-05-19 04:54:16.000000000 -0700 |
| 15231 | @@ -0,0 +1,11 @@ |
| 15232 | +typedef struct { int licensed; } __pmPDUInfo; |
| 15233 | +void __pmDecodeXtendError (int *); |
| 15234 | +void do_handshake(void) |
| 15235 | +{ |
| 15236 | + __pmPDUInfo *pduinfo; |
| 15237 | + int challenge; |
| 15238 | + __pmDecodeXtendError(&challenge); |
| 15239 | + pduinfo = (__pmPDUInfo *)&challenge; |
| 15240 | + *pduinfo = *pduinfo; |
| 15241 | +} |
| 15242 | + |
| 15243 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/920428-2.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/920428-2.c |
| 15244 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/920428-2.c 1998-12-16 14:24:51.000000000 -0800 |
| 15245 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/920428-2.c 2009-05-28 02:19:37.000000000 -0700 |
| 15246 | @@ -41,7 +41,7 @@ |
| 15247 | short _flag; |
| 15248 | char _file; |
| 15249 | } _iob[]; |
| 15250 | -typedef unsigned long size_t; |
| 15251 | +typedef __SIZE_TYPE__ size_t; |
| 15252 | typedef char *va_list; |
| 15253 | struct _iobuf *fopen(const char *filename, const char *type); |
| 15254 | struct _iobuf *freopen(const char *filename, const char *type, struct _iobuf *stream); |
| 15255 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/980329-1.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/980329-1.c |
| 15256 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/980329-1.c 1998-12-16 14:24:51.000000000 -0800 |
| 15257 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/980329-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 15258 | @@ -1,4 +1,4 @@ |
| 15259 | -typedef unsigned long int size_t; |
| 15260 | +typedef __SIZE_TYPE__ size_t; |
| 15261 | struct re_pattern_buffer |
| 15262 | { |
| 15263 | unsigned char *buffer; |
| 15264 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/980816-1.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/980816-1.c |
| 15265 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/980816-1.c 1998-12-16 14:24:51.000000000 -0800 |
| 15266 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/980816-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 15267 | @@ -1,4 +1,4 @@ |
| 15268 | -typedef unsigned int size_t; |
| 15269 | +typedef __SIZE_TYPE__ size_t; |
| 15270 | typedef void *XtPointer; |
| 15271 | |
| 15272 | typedef struct _WidgetRec *Widget; |
| 15273 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr32584.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr32584.c |
| 15274 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr32584.c 2007-07-02 11:27:46.000000000 -0700 |
| 15275 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr32584.c 2009-05-28 02:19:37.000000000 -0700 |
| 15276 | @@ -1,5 +1,8 @@ |
| 15277 | -typedef long unsigned int size_t; |
| 15278 | -typedef long int __ssize_t; |
| 15279 | +typedef __SIZE_TYPE__ size_t; |
| 15280 | +/* Kludge */ |
| 15281 | +#define unsigned |
| 15282 | +typedef __SIZE_TYPE__ __ssize_t; |
| 15283 | +#undef unsigned |
| 15284 | typedef struct |
| 15285 | { |
| 15286 | } __mbstate_t; |
| 15287 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr33173.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr33173.c |
| 15288 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr33173.c 2007-08-27 07:18:36.000000000 -0700 |
| 15289 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr33173.c 2009-05-28 02:19:37.000000000 -0700 |
| 15290 | @@ -1,4 +1,4 @@ |
| 15291 | -typedef long unsigned int size_t; |
| 15292 | +typedef __SIZE_TYPE__ size_t; |
| 15293 | typedef struct |
| 15294 | { |
| 15295 | } |
| 15296 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr33382.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr33382.c |
| 15297 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr33382.c 2007-09-12 01:07:12.000000000 -0700 |
| 15298 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr33382.c 2009-05-28 02:19:37.000000000 -0700 |
| 15299 | @@ -1,4 +1,4 @@ |
| 15300 | -typedef unsigned int size_t; |
| 15301 | +typedef __SIZE_TYPE__ size_t; |
| 15302 | typedef struct { |
| 15303 | int disable; |
| 15304 | char *searchconfig[]; |
| 15305 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr34334.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr34334.c |
| 15306 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr34334.c 2007-12-04 09:20:34.000000000 -0800 |
| 15307 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr34334.c 2009-05-28 02:19:37.000000000 -0700 |
| 15308 | @@ -1,4 +1,4 @@ |
| 15309 | -typedef unsigned int size_t; |
| 15310 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 15311 | __extension__ typedef long long int __quad_t; |
| 15312 | __extension__ typedef unsigned int __mode_t; |
| 15313 | __extension__ typedef __quad_t __off64_t; |
| 15314 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr34688.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr34688.c |
| 15315 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr34688.c 2008-01-26 15:08:54.000000000 -0800 |
| 15316 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr34688.c 2009-05-28 02:19:37.000000000 -0700 |
| 15317 | @@ -1,4 +1,4 @@ |
| 15318 | -typedef unsigned int size_t; |
| 15319 | +typedef __SIZE_TYPE__ size_t; |
| 15320 | typedef struct { |
| 15321 | } |
| 15322 | HashTable; |
| 15323 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr35043.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr35043.c |
| 15324 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr35043.c 2008-02-04 05:30:00.000000000 -0800 |
| 15325 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr35043.c 2009-05-28 02:19:37.000000000 -0700 |
| 15326 | @@ -1,4 +1,4 @@ |
| 15327 | -typedef long unsigned int size_t; |
| 15328 | +typedef __SIZE_TYPE__ size_t; |
| 15329 | typedef struct { |
| 15330 | long double dat[2]; |
| 15331 | } gsl_complex_long_double; |
| 15332 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr37669.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr37669.c |
| 15333 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr37669.c 2008-09-29 14:23:52.000000000 -0700 |
| 15334 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr37669.c 2009-05-28 02:19:37.000000000 -0700 |
| 15335 | @@ -1,6 +1,6 @@ |
| 15336 | /* This testcase used to fail because a miscompiled execute_fold_all_builtins. */ |
| 15337 | |
| 15338 | -typedef long unsigned int size_t; |
| 15339 | +typedef __SIZE_TYPE__ size_t; |
| 15340 | extern __inline __attribute__ ((__always_inline__)) int __attribute__ |
| 15341 | ((__nothrow__)) snprintf (char *__restrict __s, size_t __n, __const char |
| 15342 | *__restrict __fmt, ...) { |
| 15452 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr39983.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr39983.c |
| 15453 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr39983.c 1969-12-31 16:00:00.000000000 -0800 |
| 15454 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr39983.c 2009-05-06 10:45:40.000000000 -0700 |
| 15455 | @@ -0,0 +1,17 @@ |
| 15456 | +typedef struct { |
| 15457 | + int *p; |
| 15458 | +} *A; |
| 15459 | + |
| 15460 | +extern const int a[1]; |
| 15461 | +extern const int b[1]; |
| 15462 | + |
| 15463 | +void foo() |
| 15464 | +{ |
| 15465 | + A x; |
| 15466 | + A y; |
| 15467 | + static const int * const c[] = { b }; |
| 15468 | + |
| 15469 | + x->p = (int*)c[0]; |
| 15470 | + y->p = (int*)a; |
| 15471 | +} |
| 15472 | + |
| 15473 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr39999.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr39999.c |
| 15474 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr39999.c 1969-12-31 16:00:00.000000000 -0800 |
| 15475 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr39999.c 2009-05-18 03:13:43.000000000 -0700 |
| 15476 | @@ -0,0 +1,18 @@ |
| 15477 | +void foo(void *); |
| 15478 | +void |
| 15479 | +MMAPGCD (int *A1, int *A2) |
| 15480 | +{ |
| 15481 | + int *t; |
| 15482 | + |
| 15483 | + do |
| 15484 | + { |
| 15485 | + t = A1; |
| 15486 | + A1 = A2; |
| 15487 | + A2 = t; |
| 15488 | + } |
| 15489 | + while (A2[-1]); |
| 15490 | + |
| 15491 | + foo (A1-1); |
| 15492 | + foo (A2-1); |
| 15493 | +} |
| 15494 | + |
| 15495 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40023.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40023.c |
| 15496 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40023.c 1969-12-31 16:00:00.000000000 -0800 |
| 15497 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40023.c 2009-05-06 10:45:40.000000000 -0700 |
| 15498 | @@ -0,0 +1,11 @@ |
| 15499 | +typedef __builtin_va_list va_list; |
| 15500 | +typedef struct { |
| 15501 | + va_list ap; |
| 15502 | +} ScanfState; |
| 15503 | +void |
| 15504 | +GetInt(ScanfState *state, long llval) |
| 15505 | +{ |
| 15506 | + *__builtin_va_arg(state->ap,long *) = llval; |
| 15507 | + __builtin_va_end(state->ap); |
| 15508 | +} |
| 15509 | + |
| 15510 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40026.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40026.c |
| 15511 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40026.c 1969-12-31 16:00:00.000000000 -0800 |
| 15512 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40026.c 2009-05-11 09:49:17.000000000 -0700 |
| 15513 | @@ -0,0 +1,15 @@ |
| 15514 | +typedef struct { |
| 15515 | + unsigned long bits; |
| 15516 | +} S; |
| 15517 | +struct T { |
| 15518 | + S span; |
| 15519 | + int flags; |
| 15520 | +}; |
| 15521 | + |
| 15522 | +struct T f(int x) |
| 15523 | +{ |
| 15524 | + return (struct T) { |
| 15525 | + .span = (S) { 0UL }, |
| 15526 | + .flags = (x ? 256 : 0), |
| 15527 | + }; |
| 15528 | +} |
| 15529 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40035.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40035.c |
| 15530 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40035.c 1969-12-31 16:00:00.000000000 -0800 |
| 15531 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40035.c 2009-05-13 14:42:03.000000000 -0700 |
| 15532 | @@ -0,0 +1,20 @@ |
| 15533 | +typedef __SIZE_TYPE__ size_t; |
| 15534 | +void *memmove (void *dest, const void *src, size_t count); |
| 15535 | +size_t strlen (const char *s); |
| 15536 | + |
| 15537 | +int |
| 15538 | +foo (char *param, char *val) |
| 15539 | +{ |
| 15540 | + if (val) |
| 15541 | + { |
| 15542 | + if (val == param + strlen (param) + 1) |
| 15543 | + val[-1] = '='; |
| 15544 | + else if (val == param + strlen (param) + 2) |
| 15545 | + { |
| 15546 | + val[-2] = '='; |
| 15547 | + memmove (val - 1, val, strlen (val) + 1); |
| 15548 | + val--; |
| 15549 | + } |
| 15550 | + } |
| 15551 | + return 0; |
| 15552 | +} |
| 15553 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40080.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40080.c |
| 15554 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40080.c 1969-12-31 16:00:00.000000000 -0800 |
| 15555 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40080.c 2009-05-11 09:49:17.000000000 -0700 |
| 15556 | @@ -0,0 +1,44 @@ |
| 15557 | +extern void *ff(void*,int); |
| 15558 | + |
| 15559 | +struct lpgl { struct lpgl *next; }; |
| 15560 | +struct lpgd { struct lpgl *first; }; |
| 15561 | + |
| 15562 | +typedef int (*xfn)( ); |
| 15563 | +static void xDP_IF_EnumGroupsInGroup ( void *a, int b, xfn fn) |
| 15564 | +{ |
| 15565 | + struct lpgd *lpGData; |
| 15566 | + struct lpgl *lpGList; |
| 15567 | + |
| 15568 | + if( ( lpGData = ff( a, b ) ) == ((void *)0) ) |
| 15569 | + return; |
| 15570 | + |
| 15571 | + if( lpGData->first == ((void *)0) ) |
| 15572 | + return; |
| 15573 | + lpGList = lpGData->first; |
| 15574 | + |
| 15575 | + for( ;; ) { |
| 15576 | + if( !(*fn)( ) ) |
| 15577 | + return; |
| 15578 | + if( lpGList->next == ((void *)0) ) |
| 15579 | + break; |
| 15580 | + lpGList = lpGList->next; |
| 15581 | + } |
| 15582 | + return; |
| 15583 | +} |
| 15584 | + |
| 15585 | + |
| 15586 | +static int |
| 15587 | +xcbDeletePlayerFromAllGroups() { |
| 15588 | + xDP_IF_EnumGroupsInGroup(0, 0, 0); |
| 15589 | + return 1; |
| 15590 | +} |
| 15591 | + |
| 15592 | +void xDP_IF_EnumGroups( xfn fn) { |
| 15593 | + xDP_IF_EnumGroupsInGroup( 0, 0, fn); |
| 15594 | +} |
| 15595 | + |
| 15596 | +static void xDP_IF_DestroyPlayer () { |
| 15597 | + xDP_IF_EnumGroups( xcbDeletePlayerFromAllGroups); |
| 15598 | +} |
| 15599 | + |
| 15600 | +void* foo=xDP_IF_DestroyPlayer; |
| 15601 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40204.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40204.c |
| 15602 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40204.c 1969-12-31 16:00:00.000000000 -0800 |
| 15603 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40204.c 2009-05-20 14:11:10.000000000 -0700 |
| 15604 | @@ -0,0 +1,14 @@ |
| 15605 | +/* PR middle-end/40204 */ |
| 15606 | + |
| 15607 | +struct S |
| 15608 | +{ |
| 15609 | + unsigned int a : 4; |
| 15610 | + unsigned int b : 28; |
| 15611 | +} s; |
| 15612 | +char c; |
| 15613 | + |
| 15614 | +void |
| 15615 | +f (void) |
| 15616 | +{ |
| 15617 | + s.a = (c >> 4) & ~(1 << 4); |
| 15618 | +} |
| 15619 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40233.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40233.c |
| 15620 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40233.c 1969-12-31 16:00:00.000000000 -0800 |
| 15621 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40233.c 2009-05-30 06:49:33.000000000 -0700 |
| 15622 | @@ -0,0 +1,10 @@ |
| 15623 | +typedef int aligned __attribute__((aligned(64))); |
| 15624 | +struct Frame { |
| 15625 | + aligned i; |
| 15626 | +}; |
| 15627 | + |
| 15628 | +void foo(struct Frame *p) |
| 15629 | +{ |
| 15630 | + aligned *q = &p->i; |
| 15631 | + *q = 0; |
| 15632 | +} |
| 15633 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40252.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40252.c |
| 15634 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40252.c 1969-12-31 16:00:00.000000000 -0800 |
| 15635 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40252.c 2009-05-30 06:49:33.000000000 -0700 |
| 15636 | @@ -0,0 +1,6 @@ |
| 15637 | +typedef unsigned int uint32_t; |
| 15638 | +static void IP(uint32_t v[2]) |
| 15639 | +{ |
| 15640 | + v[0] = ((v[0] << 1) | ((v[0] >> 31) & 1L)) & 0xffffffffL; |
| 15641 | +} |
| 15642 | + |
| 15643 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40291.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40291.c |
| 15644 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/compile/pr40291.c 1969-12-31 16:00:00.000000000 -0800 |
| 15645 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/compile/pr40291.c 2009-05-29 08:47:31.000000000 -0700 |
| 15646 | @@ -0,0 +1,7 @@ |
| 15647 | +/* PR middle-end/40291 */ |
| 15648 | + |
| 15649 | +int |
| 15650 | +foo (void *x, char *y, unsigned long long z) |
| 15651 | +{ |
| 15652 | + return memcmp (x, y, z); |
| 15653 | +} |
| 15654 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/execute/pr40022.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/execute/pr40022.c |
| 15655 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/execute/pr40022.c 1969-12-31 16:00:00.000000000 -0800 |
| 15656 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/execute/pr40022.c 2009-05-06 01:32:24.000000000 -0700 |
| 15657 | @@ -0,0 +1,51 @@ |
| 15658 | +extern void abort (void); |
| 15659 | + |
| 15660 | +struct A |
| 15661 | +{ |
| 15662 | + struct A *a; |
| 15663 | +}; |
| 15664 | + |
| 15665 | +struct B |
| 15666 | +{ |
| 15667 | + struct A *b; |
| 15668 | +}; |
| 15669 | + |
| 15670 | +__attribute__((noinline)) |
| 15671 | +struct A * |
| 15672 | +foo (struct A *x) |
| 15673 | +{ |
| 15674 | + asm volatile ("" : : "g" (x) : "memory"); |
| 15675 | + return x; |
| 15676 | +} |
| 15677 | + |
| 15678 | +__attribute__((noinline)) |
| 15679 | +void |
| 15680 | +bar (struct B *w, struct A *x, struct A *y, struct A *z) |
| 15681 | +{ |
| 15682 | + struct A **c; |
| 15683 | + c = &w->b; |
| 15684 | + *c = foo (x); |
| 15685 | + while (*c) |
| 15686 | + c = &(*c)->a; |
| 15687 | + *c = foo (y); |
| 15688 | + while (*c) |
| 15689 | + c = &(*c)->a; |
| 15690 | + *c = foo (z); |
| 15691 | +} |
| 15692 | + |
| 15693 | +struct B d; |
| 15694 | +struct A e, f, g; |
| 15695 | + |
| 15696 | +int |
| 15697 | +main (void) |
| 15698 | +{ |
| 15699 | + f.a = &g; |
| 15700 | + bar (&d, &e, &f, 0); |
| 15701 | + if (d.b == 0 |
| 15702 | + || d.b->a == 0 |
| 15703 | + || d.b->a->a == 0 |
| 15704 | + || d.b->a->a->a != 0) |
| 15705 | + abort (); |
| 15706 | + return 0; |
| 15707 | +} |
| 15708 | + |
| 15709 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/execute/pr40057.c gcc-4.4.0/gcc/testsuite/gcc.c-torture/execute/pr40057.c |
| 15710 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.c-torture/execute/pr40057.c 1969-12-31 16:00:00.000000000 -0800 |
| 15711 | +++ gcc-4.4.0/gcc/testsuite/gcc.c-torture/execute/pr40057.c 2009-05-07 08:36:23.000000000 -0700 |
| 15712 | @@ -0,0 +1,37 @@ |
| 15713 | +/* PR middle-end/40057 */ |
| 15714 | + |
| 15715 | +extern void abort (void); |
| 15716 | + |
| 15717 | +__attribute__((noinline)) int |
| 15718 | +foo (unsigned long long x) |
| 15719 | +{ |
| 15720 | + unsigned long long y = (x >> 31ULL) & 1ULL; |
| 15721 | + if (y == 0ULL) |
| 15722 | + return 0; |
| 15723 | + return -1; |
| 15724 | +} |
| 15725 | + |
| 15726 | +__attribute__((noinline)) int |
| 15727 | +bar (long long x) |
| 15728 | +{ |
| 15729 | + long long y = (x >> 31LL) & 1LL; |
| 15730 | + if (y == 0LL) |
| 15731 | + return 0; |
| 15732 | + return -1; |
| 15733 | +} |
| 15734 | + |
| 15735 | +int |
| 15736 | +main (void) |
| 15737 | +{ |
| 15738 | + if (sizeof (long long) != 8) |
| 15739 | + return 0; |
| 15740 | + if (foo (0x1682a9aaaULL)) |
| 15741 | + abort (); |
| 15742 | + if (!foo (0x1882a9aaaULL)) |
| 15743 | + abort (); |
| 15744 | + if (bar (0x1682a9aaaLL)) |
| 15745 | + abort (); |
| 15746 | + if (!bar (0x1882a9aaaLL)) |
| 15747 | + abort (); |
| 15748 | + return 0; |
| 15749 | +} |
| 15750 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/20050629-1.c gcc-4.4.0/gcc/testsuite/gcc.dg/20050629-1.c |
| 15751 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/20050629-1.c 2005-06-29 17:51:17.000000000 -0700 |
| 15752 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/20050629-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 15753 | @@ -5,7 +5,7 @@ |
| 15754 | contains many warnings, but it exposes a copy propagation bug that |
| 15755 | is somewhat difficult to reproduce otherwise. */ |
| 15756 | |
| 15757 | -typedef long unsigned int size_t; |
| 15758 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 15759 | extern void fancy_abort (const char *, int, const char *) __attribute__ ((__noreturn__)); |
| 15760 | typedef union tree_node *tree; |
| 15761 | enum tree_code { |
| 15762 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/dfp/pr39986.c gcc-4.4.0/gcc/testsuite/gcc.dg/dfp/pr39986.c |
| 15763 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/dfp/pr39986.c 1969-12-31 16:00:00.000000000 -0800 |
| 15764 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/dfp/pr39986.c 2009-05-06 10:14:00.000000000 -0700 |
| 15765 | @@ -0,0 +1,31 @@ |
| 15766 | +/* { dg-do compile } */ |
| 15767 | +/* { dg-options "-std=gnu99" } */ |
| 15768 | + |
| 15769 | +/* Check that the compiler generates the correct decimal float constants. */ |
| 15770 | + |
| 15771 | +_Decimal32 a = 100.223df; |
| 15772 | +_Decimal32 b = -2.3df; |
| 15773 | +_Decimal64 c = 3.4e-4dd; |
| 15774 | +_Decimal64 d = -4.500dd; |
| 15775 | +_Decimal128 e = 5678901234567.89e+200dl; |
| 15776 | +_Decimal128 f = -678901.234e-6dl; |
| 15777 | + |
| 15778 | +/* The first value is DPD, the second is BID. The order differs depending |
| 15779 | + on whether the target is big-endian or little-endian. */ |
| 15780 | + |
| 15781 | +/* { dg-final { scan-assembler ".long\t(572653859|822183807)\n" } } */ |
| 15782 | + |
| 15783 | +/* { dg-final { scan-assembler ".long\t(-1572863965|-1308622825)\n" } } */ |
| 15784 | + |
| 15785 | +/* { dg-final { scan-assembler ".long\t(52|34)\n" } } */ |
| 15786 | +/* { dg-final { scan-assembler ".long\t(572784640|824180736)\n" } } */ |
| 15787 | + |
| 15788 | +/* { dg-final { scan-assembler ".long\t(4736|4500)\n" } } */ |
| 15789 | +/* { dg-final { scan-assembler ".long\t(-1574174720|-1319108608)\n" } } */ |
| 15790 | + |
| 15791 | +/* { dg-final { scan-assembler ".long\t(-1975952433|957645077)\n" } } */ |
| 15792 | +/* { dg-final { scan-assembler ".long\t(190215|132222)\n" } } */ |
| 15793 | +/* { dg-final { scan-assembler ".long\t(574193664|835452928)\n" } } */ |
| 15794 | + |
| 15795 | +/* { dg-final { scan-assembler ".long\t(931280180|678901234)\n" } } */ |
| 15796 | +/* { dg-final { scan-assembler ".long\t(-1576681472|-1339162624)\n" } } */ |
| 15797 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/pr33667.c gcc-4.4.0/gcc/testsuite/gcc.dg/pr33667.c |
| 15798 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/pr33667.c 2007-10-05 10:56:52.000000000 -0700 |
| 15799 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/pr33667.c 2009-05-28 02:19:37.000000000 -0700 |
| 15800 | @@ -1,7 +1,7 @@ |
| 15801 | /* { dg-do compile } */ |
| 15802 | /* { dg-options "-O2" } */ |
| 15803 | |
| 15804 | -typedef unsigned int size_t; |
| 15805 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 15806 | typedef unsigned char uint8_t; |
| 15807 | typedef unsigned short int uint16_t; |
| 15808 | typedef unsigned long long int uint64_t; |
| 16203 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/tree-ssa/20041122-1.c gcc-4.4.0/gcc/testsuite/gcc.dg/tree-ssa/20041122-1.c |
| 16204 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/tree-ssa/20041122-1.c 2008-08-20 05:59:10.000000000 -0700 |
| 16205 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/tree-ssa/20041122-1.c 2009-05-28 02:19:37.000000000 -0700 |
| 16206 | @@ -2,7 +2,7 @@ |
| 16207 | /* { dg-options "-O1 -fdump-tree-dom2" } */ |
| 16208 | |
| 16209 | |
| 16210 | -typedef unsigned int size_t; |
| 16211 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 16212 | extern void *xmalloc (size_t) __attribute__ ((__malloc__)); |
| 16213 | struct edge_def |
| 16214 | { |
| 16215 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/tree-ssa/pr36908.c gcc-4.4.0/gcc/testsuite/gcc.dg/tree-ssa/pr36908.c |
| 16216 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/tree-ssa/pr36908.c 2008-11-03 08:35:13.000000000 -0800 |
| 16217 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/tree-ssa/pr36908.c 2009-05-28 02:19:37.000000000 -0700 |
| 16218 | @@ -2,7 +2,7 @@ |
| 16219 | /* { dg-options "-O2 -ftree-loop-distribution" } */ |
| 16220 | #define NULL ((void *)0) |
| 16221 | |
| 16222 | -typedef unsigned int size_t; |
| 16223 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 16224 | extern void *foo(size_t nelem, size_t elsize); |
| 16225 | extern void bar (char*, ...); |
| 16226 | |
| 16227 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/tree-ssa/pr38250.c gcc-4.4.0/gcc/testsuite/gcc.dg/tree-ssa/pr38250.c |
| 16228 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/tree-ssa/pr38250.c 2008-12-03 05:43:12.000000000 -0800 |
| 16229 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/tree-ssa/pr38250.c 2009-05-28 02:19:37.000000000 -0700 |
| 16230 | @@ -1,7 +1,7 @@ |
| 16231 | /* { dg-do compile } */ |
| 16232 | /* { dg-options "-O2 -ftree-loop-distribution" } */ |
| 16233 | |
| 16234 | -typedef long unsigned int size_t; |
| 16235 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 16236 | typedef struct { |
| 16237 | long dat[2]; |
| 16238 | } gsl_complex_long_double; |
| 16239 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/tree-ssa/pr40087.c gcc-4.4.0/gcc/testsuite/gcc.dg/tree-ssa/pr40087.c |
| 16240 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/tree-ssa/pr40087.c 1969-12-31 16:00:00.000000000 -0800 |
| 16241 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/tree-ssa/pr40087.c 2009-05-22 13:43:39.000000000 -0700 |
| 16242 | @@ -0,0 +1,30 @@ |
| 16243 | +/* { dg-do run } */ |
| 16244 | +/* { dg-options "-O1 " } */ |
| 16245 | + |
| 16246 | +extern void abort (void); |
| 16247 | + |
| 16248 | +static void __attribute__((always_inline)) |
| 16249 | +reverse(int *first, int *last) |
| 16250 | +{ |
| 16251 | + if (first == last--) |
| 16252 | + return; |
| 16253 | + while (first != last) |
| 16254 | + { |
| 16255 | + int t = *first; |
| 16256 | + *first = *last; |
| 16257 | + *last = t; |
| 16258 | + if (++first == last--) |
| 16259 | + break; |
| 16260 | + } |
| 16261 | +} |
| 16262 | + |
| 16263 | +int main() |
| 16264 | +{ |
| 16265 | + int seq[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; |
| 16266 | + |
| 16267 | + reverse(seq, seq + 8); |
| 16268 | + if (seq[3] != 5 || seq[4] != 4) |
| 16269 | + abort (); |
| 16270 | + |
| 16271 | + return 0; |
| 16272 | +} |
| 16273 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-10.c gcc-4.4.0/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-10.c |
| 16274 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-10.c 2007-08-16 13:28:43.000000000 -0700 |
| 16275 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-10.c 2009-05-28 02:19:37.000000000 -0700 |
| 16276 | @@ -1,7 +1,7 @@ |
| 16277 | /* { dg-do compile } */ |
| 16278 | /* { dg-options "-O -w -fdump-tree-dse-vops" } */ |
| 16279 | |
| 16280 | -typedef unsigned int size_t; |
| 16281 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 16282 | typedef struct _IO_FILE FILE; |
| 16283 | typedef struct |
| 16284 | { |
| 16285 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/vect/pr40074.c gcc-4.4.0/gcc/testsuite/gcc.dg/vect/pr40074.c |
| 16286 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/vect/pr40074.c 1969-12-31 16:00:00.000000000 -0800 |
| 16287 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/vect/pr40074.c 2009-05-11 04:54:02.000000000 -0700 |
| 16288 | @@ -0,0 +1,54 @@ |
| 16289 | +/* { dg-require-effective-target vect_int } */ |
| 16290 | + |
| 16291 | +#include <stdarg.h> |
| 16292 | +#include "tree-vect.h" |
| 16293 | + |
| 16294 | +#define N 16 |
| 16295 | + |
| 16296 | +typedef struct { |
| 16297 | + int a; |
| 16298 | + int b; |
| 16299 | + int c; |
| 16300 | + int d; |
| 16301 | +} s; |
| 16302 | + |
| 16303 | + |
| 16304 | +s arr[N] = {{7,0,1,5}, {7,2,3,5}, {7,4,5,5}, {7,6,7,5}, {7,8,9,5}, {7,10,11,5}, {7,12,13,5}, {7,14,15,5}, {7,16,17,5}, {7,18,19,5}, {7,20,21,5}, {7,22,23,5}, {7,24,25,5}, {7,26,27,5}, {7,28,29,5}, {7,30,31,5}}; |
| 16305 | + |
| 16306 | +__attribute__ ((noinline)) int |
| 16307 | +main1 () |
| 16308 | +{ |
| 16309 | + s *p = arr, *q = arr + 1; |
| 16310 | + int res[N]; |
| 16311 | + int i; |
| 16312 | + |
| 16313 | + for (i = 0; i < N-1; i++) |
| 16314 | + { |
| 16315 | + res[i] = p->b + p->d + q->b; |
| 16316 | + p++; |
| 16317 | + q++; |
| 16318 | + } |
| 16319 | + |
| 16320 | + /* check results: */ |
| 16321 | + for (i = 0; i < N-1; i++) |
| 16322 | + { |
| 16323 | + if (res[i] != arr[i].b + arr[i].d + arr[i+1].b) |
| 16324 | + abort (); |
| 16325 | + } |
| 16326 | + |
| 16327 | + return 0; |
| 16328 | +} |
| 16329 | + |
| 16330 | +int main (void) |
| 16331 | +{ |
| 16332 | + int i; |
| 16333 | + |
| 16334 | + check_vect (); |
| 16335 | + |
| 16336 | + main1 (); |
| 16337 | + |
| 16338 | + return 0; |
| 16339 | +} |
| 16340 | + |
| 16341 | +/* { dg-final { cleanup-tree-dump "vect" } } */ |
| 16342 | + |
| 16343 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/vect/pr40238.c gcc-4.4.0/gcc/testsuite/gcc.dg/vect/pr40238.c |
| 16344 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/vect/pr40238.c 1969-12-31 16:00:00.000000000 -0800 |
| 16345 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/vect/pr40238.c 2009-05-30 06:49:33.000000000 -0700 |
| 16346 | @@ -0,0 +1,35 @@ |
| 16347 | +/* { dg-do compile } */ |
| 16348 | + |
| 16349 | +extern int xdo_rb_ctr_row( int *pos_code); |
| 16350 | + |
| 16351 | +int xgp_ahd_interpolate (int tile) |
| 16352 | +{ |
| 16353 | + int p[4]; |
| 16354 | + |
| 16355 | + switch (tile) { |
| 16356 | + default: |
| 16357 | + case 0: |
| 16358 | + case 1: |
| 16359 | + p[0] = 0; p[1] = 1; p[2] = 2; p[3] = 3; |
| 16360 | + break; |
| 16361 | + case 2: |
| 16362 | + case 3: |
| 16363 | + p[0] = 1; p[1] = 0; p[2] = 3; p[3] = 2; |
| 16364 | + break; |
| 16365 | + case 4: |
| 16366 | + case 5: |
| 16367 | + p[0] = 3; p[1] = 2; p[2] = 1; p[3] = 0; |
| 16368 | + break; |
| 16369 | + case 6: |
| 16370 | + case 7: |
| 16371 | + p[0] = 2; p[1] = 3; p[2] = 0; p[3] = 1; |
| 16372 | + break; |
| 16373 | + } |
| 16374 | + |
| 16375 | + xdo_rb_ctr_row(p); |
| 16376 | + xdo_rb_ctr_row(p); |
| 16377 | + return 0; |
| 16378 | +} |
| 16379 | + |
| 16380 | +/* { dg-final { cleanup-tree-dump "vect" } } */ |
| 16381 | + |
| 16382 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.dg/vect/pr40254.c gcc-4.4.0/gcc/testsuite/gcc.dg/vect/pr40254.c |
| 16383 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.dg/vect/pr40254.c 1969-12-31 16:00:00.000000000 -0800 |
| 16384 | +++ gcc-4.4.0/gcc/testsuite/gcc.dg/vect/pr40254.c 2009-05-30 06:49:33.000000000 -0700 |
| 16385 | @@ -0,0 +1,39 @@ |
| 16386 | +#include <stdlib.h> |
| 16387 | +#include <stdarg.h> |
| 16388 | +#include "tree-vect.h" |
| 16389 | + |
| 16390 | +struct s |
| 16391 | +{ |
| 16392 | + int *x; |
| 16393 | + int x1; |
| 16394 | + int x2; |
| 16395 | + int x3; |
| 16396 | + int *y; |
| 16397 | +}; |
| 16398 | + |
| 16399 | +struct s arr[64] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); |
| 16400 | + |
| 16401 | +__attribute__ ((noinline)) void |
| 16402 | +foo (int i, int *in_x, int *in_y) |
| 16403 | +{ |
| 16404 | + arr[i].x = in_x; |
| 16405 | + arr[i].y = in_y; |
| 16406 | +} |
| 16407 | + |
| 16408 | +int |
| 16409 | +main (void) |
| 16410 | +{ |
| 16411 | + int a, b; |
| 16412 | + |
| 16413 | + check_vect (); |
| 16414 | + |
| 16415 | + foo (5, &a, &b); |
| 16416 | + |
| 16417 | + if (arr[5].x != &a || arr[5].y != &b) |
| 16418 | + abort (); |
| 16419 | + |
| 16420 | + return 0; |
| 16421 | +} |
| 16422 | + |
| 16423 | +/* { dg-final { cleanup-tree-dump "vect" } } */ |
| 16424 | + |
| 16654 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.target/powerpc/altivec-30.c gcc-4.4.0/gcc/testsuite/gcc.target/powerpc/altivec-30.c |
| 16655 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.target/powerpc/altivec-30.c 1969-12-31 16:00:00.000000000 -0800 |
| 16656 | +++ gcc-4.4.0/gcc/testsuite/gcc.target/powerpc/altivec-30.c 2009-05-29 00:14:20.000000000 -0700 |
| 16657 | @@ -0,0 +1,32 @@ |
| 16658 | +/* { dg-do compile { target powerpc*-*-* } } */ |
| 16659 | +/* { dg-require-effective-target powerpc_altivec_ok } */ |
| 16660 | +/* { dg-options "-maltivec" } */ |
| 16661 | + |
| 16662 | +#include <stdbool.h> |
| 16663 | +#include <altivec.h> |
| 16664 | + |
| 16665 | +#define f0(type) void x0##type (vector bool type x) { } |
| 16666 | +f0 (int) |
| 16667 | + |
| 16668 | +#define f1(v, type) void x1##type (v bool type x) { } |
| 16669 | +f1 (vector, int) |
| 16670 | + |
| 16671 | +#define f2(b, type) void x2##type (vector b type x) { } |
| 16672 | +f2 (bool, int) |
| 16673 | + |
| 16674 | +#define f3(v, b, type) void x3##type (v b type x) { } |
| 16675 | +f3 (vector, bool, int) |
| 16676 | + |
| 16677 | +#define f4(v, b, type) void x4##type (v type b x) { } |
| 16678 | +f4 (vector, bool, int) |
| 16679 | + |
| 16680 | +#define B bool |
| 16681 | +#define I int |
| 16682 | +#define BI bool int |
| 16683 | +#define VBI vector bool int |
| 16684 | + |
| 16685 | +vector bool int a; |
| 16686 | +vector B int b; |
| 16687 | +vector B I c; |
| 16688 | +vector BI d; |
| 16689 | +VBI e; |
| 16690 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.target/powerpc/altivec-31.c gcc-4.4.0/gcc/testsuite/gcc.target/powerpc/altivec-31.c |
| 16691 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.target/powerpc/altivec-31.c 1969-12-31 16:00:00.000000000 -0800 |
| 16692 | +++ gcc-4.4.0/gcc/testsuite/gcc.target/powerpc/altivec-31.c 2009-05-29 00:14:20.000000000 -0700 |
| 16693 | @@ -0,0 +1,29 @@ |
| 16694 | +/* { dg-do compile { target powerpc*-*-* } } */ |
| 16695 | +/* { dg-require-effective-target powerpc_altivec_ok } */ |
| 16696 | +/* { dg-options "-maltivec" } */ |
| 16697 | + |
| 16698 | +#define f0(type) void x0##type (vector _Bool type x) { } |
| 16699 | +f0 (int) |
| 16700 | + |
| 16701 | +#define f1(v, type) void x1##type (v _Bool type x) { } |
| 16702 | +f1 (vector, int) |
| 16703 | + |
| 16704 | +#define f2(b, type) void x2##type (vector b type x) { } |
| 16705 | +f2 (_Bool, int) |
| 16706 | + |
| 16707 | +#define f3(v, b, type) void x3##type (v b type x) { } |
| 16708 | +f3 (vector, _Bool, int) |
| 16709 | + |
| 16710 | +#define f4(v, b, type) void x4##type (v type b x) { } |
| 16711 | +f4 (vector, _Bool, int) |
| 16712 | + |
| 16713 | +#define B _Bool |
| 16714 | +#define I int |
| 16715 | +#define BI _Bool int |
| 16716 | +#define VBI vector _Bool int |
| 16717 | + |
| 16718 | +vector _Bool int a; |
| 16719 | +vector B int b; |
| 16720 | +vector B I c; |
| 16721 | +vector BI d; |
| 16722 | +VBI e; |
| 16723 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.target/powerpc/altivec-types-1.c gcc-4.4.0/gcc/testsuite/gcc.target/powerpc/altivec-types-1.c |
| 16724 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.target/powerpc/altivec-types-1.c 2008-08-26 14:39:49.000000000 -0700 |
| 16725 | +++ gcc-4.4.0/gcc/testsuite/gcc.target/powerpc/altivec-types-1.c 2009-05-29 00:14:20.000000000 -0700 |
| 16726 | @@ -24,6 +24,7 @@ |
| 16727 | __vector signed vsj; |
| 16728 | __vector __bool vbj; |
| 16729 | __vector float vf; |
| 16730 | +__vector _Bool vb; |
| 16731 | |
| 16732 | /* These should be rejected as invalid AltiVec types. */ |
| 16733 | |
| 16734 | @@ -37,7 +38,6 @@ |
| 16735 | __vector __bool long long int vblli; /* { dg-error "AltiVec types" "" } */ |
| 16736 | __vector double vd1; /* { dg-error "AltiVec types" "" } */ |
| 16737 | __vector long double vld; /* { dg-error "AltiVec types" "" } */ |
| 16738 | -__vector _Bool vb; /* { dg-error "AltiVec types" "" } */ |
| 16739 | __vector _Complex float vcf; /* { dg-error "AltiVec types" "" } */ |
| 16740 | __vector _Complex double vcd; /* { dg-error "AltiVec types" "" } */ |
| 16741 | __vector _Complex long double vcld; /* { dg-error "AltiVec types" "" } */ |
| 16742 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gcc.target/x86_64/abi/asm-support.S gcc-4.4.0/gcc/testsuite/gcc.target/x86_64/abi/asm-support.S |
| 16743 | --- gcc-4.4.0.orig/gcc/testsuite/gcc.target/x86_64/abi/asm-support.S 2008-08-28 12:36:58.000000000 -0700 |
| 16744 | +++ gcc-4.4.0/gcc/testsuite/gcc.target/x86_64/abi/asm-support.S 2009-05-18 09:54:31.000000000 -0700 |
| 16745 | @@ -49,7 +49,9 @@ |
| 16746 | .type snapshot_ret, @function |
| 16747 | snapshot_ret: |
| 16748 | movq %rdi, rdi(%rip) |
| 16749 | + subq $8, %rsp |
| 16750 | call *callthis(%rip) |
| 16751 | + addq $8, %rsp |
| 16752 | movq %rax, rax(%rip) |
| 16753 | movq %rdx, rdx(%rip) |
| 16754 | movdqu %xmm0, xmm_regs+0(%rip) |
| 16755 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/auto14.C gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/auto14.C |
| 16756 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/auto14.C 1969-12-31 16:00:00.000000000 -0800 |
| 16757 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/auto14.C 2009-06-03 11:11:53.000000000 -0700 |
| 16758 | @@ -0,0 +1,29 @@ |
| 16759 | +// PR c++/40306, c++/40307 |
| 16760 | +// { dg-options "-std=c++0x" } |
| 16761 | +// { dg-do run } |
| 16762 | + |
| 16763 | +template< typename T > |
| 16764 | +struct test { |
| 16765 | + test run() { |
| 16766 | + auto tmp = *this; |
| 16767 | + return tmp; |
| 16768 | + } |
| 16769 | + test run_pass() { |
| 16770 | + test tmp( *this ); |
| 16771 | + return tmp; |
| 16772 | + } |
| 16773 | + |
| 16774 | + test run_fail() { |
| 16775 | + auto tmp( *this ); |
| 16776 | + return tmp; |
| 16777 | + } |
| 16778 | +}; |
| 16779 | + |
| 16780 | +int main() |
| 16781 | +{ |
| 16782 | + test<int> x; |
| 16783 | + x.run(); |
| 16784 | + x.run_pass(); |
| 16785 | + x.run_fail(); |
| 16786 | + return 0; |
| 16787 | +} |
| 16788 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/enum3.C gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/enum3.C |
| 16789 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/enum3.C 1969-12-31 16:00:00.000000000 -0800 |
| 16790 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/enum3.C 2009-05-25 16:07:05.000000000 -0700 |
| 16791 | @@ -0,0 +1,17 @@ |
| 16792 | +// PR c++/38064 |
| 16793 | +// { dg-options "-std=c++0x" } |
| 16794 | +// { dg-do run } |
| 16795 | + |
| 16796 | +enum class E { elem }; |
| 16797 | + |
| 16798 | +template <class T> |
| 16799 | +void f (T t); |
| 16800 | + |
| 16801 | +bool f (bool b) { return b; } |
| 16802 | + |
| 16803 | +int main() |
| 16804 | +{ |
| 16805 | + E e = E::elem; |
| 16806 | + if (!f (e == E::elem)) |
| 16807 | + return 1; |
| 16808 | +} |
| 16809 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist13.C gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist13.C |
| 16810 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist13.C 2009-02-03 09:23:11.000000000 -0800 |
| 16811 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist13.C 2009-06-03 11:11:53.000000000 -0700 |
| 16812 | @@ -2,4 +2,7 @@ |
| 16813 | // { dg-do compile } |
| 16814 | // { dg-options "-std=gnu++0x" } |
| 16815 | |
| 16816 | -__complex__ int i ({0}); // { dg-error "cannot convert" } |
| 16817 | +#include <complex> |
| 16818 | + |
| 16819 | +__complex__ int i ({0}); |
| 16820 | +std::complex<int> i2 ({0}); |
| 16821 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist15.C gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist15.C |
| 16822 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist15.C 1969-12-31 16:00:00.000000000 -0800 |
| 16823 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist15.C 2009-05-28 09:09:04.000000000 -0700 |
| 16824 | @@ -0,0 +1,17 @@ |
| 16825 | +// { dg-options "-std=c++0x" } |
| 16826 | + |
| 16827 | +#include <vector> |
| 16828 | +#include <typeinfo> |
| 16829 | + |
| 16830 | +using namespace std; |
| 16831 | + |
| 16832 | +template< typename ... ArgTypes > |
| 16833 | +void test( ArgTypes ... args ) { |
| 16834 | + vector<type_info*> x = { &typeid(ArgTypes)... }; // { dg-error "" } |
| 16835 | +} |
| 16836 | + |
| 16837 | +int main() |
| 16838 | +{ |
| 16839 | + test( 1, 3.14f, 2.78 ); |
| 16840 | + return 0; |
| 16841 | +} |
| 16842 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist16.C gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist16.C |
| 16843 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist16.C 1969-12-31 16:00:00.000000000 -0800 |
| 16844 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist16.C 2009-06-03 11:11:53.000000000 -0700 |
| 16845 | @@ -0,0 +1,12 @@ |
| 16846 | +// { dg-options "-std=c++0x" } |
| 16847 | +// { dg-do run } |
| 16848 | + |
| 16849 | +extern "C" void abort(); |
| 16850 | + |
| 16851 | +void f(int i) { if (i != 42) abort(); } |
| 16852 | + |
| 16853 | +int main() |
| 16854 | +{ |
| 16855 | + f({42}); |
| 16856 | + return {0}; |
| 16857 | +} |
| 16858 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist17.C gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist17.C |
| 16859 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist17.C 1969-12-31 16:00:00.000000000 -0800 |
| 16860 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist17.C 2009-06-03 11:11:53.000000000 -0700 |
| 16861 | @@ -0,0 +1,9 @@ |
| 16862 | +// { dg-options "-std=c++0x" } |
| 16863 | + |
| 16864 | +void f(int i); |
| 16865 | + |
| 16866 | +int main() |
| 16867 | +{ |
| 16868 | + f({42.0}); // { dg-error "narrowing" } |
| 16869 | + return {1.0}; // { dg-error "narrowing" } |
| 16870 | +} |
| 16871 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist18.C gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist18.C |
| 16872 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist18.C 1969-12-31 16:00:00.000000000 -0800 |
| 16873 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist18.C 2009-06-03 11:11:53.000000000 -0700 |
| 16874 | @@ -0,0 +1,19 @@ |
| 16875 | +// PR c++/40308, 40311 |
| 16876 | +// { dg-do run } |
| 16877 | +// { dg-options "-std=c++0x" } |
| 16878 | + |
| 16879 | +template< typename T > |
| 16880 | +struct test { |
| 16881 | + test() : data{} {} |
| 16882 | + |
| 16883 | + T data; |
| 16884 | +}; |
| 16885 | + |
| 16886 | +int main() |
| 16887 | +{ |
| 16888 | + test<int> x; |
| 16889 | + test<int*> y; |
| 16890 | + int * a = new int{}; |
| 16891 | + int * b = new int{5}; |
| 16892 | + return 0; |
| 16893 | +} |
| 16894 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist19.C gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist19.C |
| 16895 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/cpp0x/initlist19.C 1969-12-31 16:00:00.000000000 -0800 |
| 16896 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/cpp0x/initlist19.C 2009-06-03 11:11:53.000000000 -0700 |
| 16897 | @@ -0,0 +1,8 @@ |
| 16898 | +// { dg-options "-std=c++0x" } |
| 16899 | + |
| 16900 | +void f(double); |
| 16901 | +int main() |
| 16902 | +{ |
| 16903 | + f({{1}}); // { dg-error "too many braces" } |
| 16904 | + // { dg-error "" "" { target *-*-* } 6 } allow other errors, too |
| 16905 | +} |
| 17014 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/ext/altivec-15.C gcc-4.4.0/gcc/testsuite/g++.dg/ext/altivec-15.C |
| 17015 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/ext/altivec-15.C 2008-03-25 20:32:13.000000000 -0700 |
| 17016 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/ext/altivec-15.C 2009-04-30 10:53:23.000000000 -0700 |
| 17017 | @@ -2,12 +2,15 @@ |
| 17018 | /* { dg-require-effective-target powerpc_altivec_ok } */ |
| 17019 | /* { dg-options "-maltivec" } */ |
| 17020 | |
| 17021 | +/* This test was added for an internal compiler error. The number and |
| 17022 | + content of error messages is irrelevant. */ |
| 17023 | + |
| 17024 | struct SubData |
| 17025 | { |
| 17026 | inline const Float Clamp(Float f, Float f0, Float f1) // { dg-error "" } |
| 17027 | } |
| 17028 | inline const void SinCos(Float angle, Float& sine, Float& cosine) // { dg-error "" } |
| 17029 | { |
| 17030 | - C0 = __builtin_vec_splat(_simdCosEstCoefficients, 0); // { dg-error "" } |
| 17031 | - C1 = __builtin_vec_splat(_simdCosEstCoefficients, 1); // { dg-error "" } |
| 17032 | + C0 = __builtin_vec_splat(_simdCosEstCoefficients, 0); |
| 17033 | + C1 = __builtin_vec_splat(_simdCosEstCoefficients, 1); |
| 17034 | |
| 17035 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/ext/packed6.C gcc-4.4.0/gcc/testsuite/g++.dg/ext/packed6.C |
| 17036 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/ext/packed6.C 2004-05-31 14:24:31.000000000 -0700 |
| 17037 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/ext/packed6.C 2009-05-28 02:37:31.000000000 -0700 |
| 17038 | @@ -1,7 +1,7 @@ |
| 17039 | // PR c++/15209 |
| 17040 | // { dg-options "-w" } |
| 17041 | |
| 17042 | -typedef unsigned int size_t; |
| 17043 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 17044 | typedef unsigned char uint8_t; |
| 17045 | typedef unsigned short int uint16_t; |
| 17046 | |
| 17047 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/ext/vla7.C gcc-4.4.0/gcc/testsuite/g++.dg/ext/vla7.C |
| 17048 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/ext/vla7.C 1969-12-31 16:00:00.000000000 -0800 |
| 17049 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/ext/vla7.C 2009-05-04 23:41:33.000000000 -0700 |
| 17050 | @@ -0,0 +1,30 @@ |
| 17051 | +// PR c++/40013 |
| 17052 | +// { dg-options "" } |
| 17053 | + |
| 17054 | +template <class T> |
| 17055 | +struct A |
| 17056 | +{ |
| 17057 | + struct B |
| 17058 | + { |
| 17059 | + struct |
| 17060 | + { |
| 17061 | + int fn () { return 0; } |
| 17062 | + } b; |
| 17063 | + }; |
| 17064 | + void test (); |
| 17065 | +}; |
| 17066 | + |
| 17067 | +template <class T> |
| 17068 | +void |
| 17069 | +A <T>::test () |
| 17070 | +{ |
| 17071 | + B a; |
| 17072 | + int vla[a.b.fn ()]; |
| 17073 | +} |
| 17074 | + |
| 17075 | +int |
| 17076 | +main () |
| 17077 | +{ |
| 17078 | + A <char> a; |
| 17079 | + a.test (); |
| 17080 | +} |
| 17081 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/opt/memcpy1.C gcc-4.4.0/gcc/testsuite/g++.dg/opt/memcpy1.C |
| 17082 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/opt/memcpy1.C 2007-12-10 14:30:02.000000000 -0800 |
| 17083 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/opt/memcpy1.C 2009-05-28 02:37:31.000000000 -0700 |
| 17084 | @@ -6,7 +6,7 @@ |
| 17085 | |
| 17086 | typedef unsigned char uint8_t; |
| 17087 | typedef uint8_t uint8; |
| 17088 | -typedef long unsigned int size_t; |
| 17089 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 17090 | class csVector2 |
| 17091 | { |
| 17092 | public:float x; |
| 17093 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/pr37742.C gcc-4.4.0/gcc/testsuite/g++.dg/pr37742.C |
| 17094 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/pr37742.C 2008-11-05 04:17:10.000000000 -0800 |
| 17095 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/pr37742.C 2009-05-28 02:37:31.000000000 -0700 |
| 17096 | @@ -1,6 +1,6 @@ |
| 17097 | /* { dg-do compile } */ |
| 17098 | |
| 17099 | -typedef long unsigned int size_t; |
| 17100 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 17101 | void* __valarray_get_memory(size_t __n); |
| 17102 | int*__restrict__ |
| 17103 | __valarray_get_storage(size_t __n) |
| 17104 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/call7.C gcc-4.4.0/gcc/testsuite/g++.dg/template/call7.C |
| 17105 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/call7.C 1969-12-31 16:00:00.000000000 -0800 |
| 17106 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/call7.C 2009-05-06 13:43:41.000000000 -0700 |
| 17107 | @@ -0,0 +1,19 @@ |
| 17108 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17109 | +// Origin: PR c++/17395 |
| 17110 | +// { dg-do "compile" } |
| 17111 | + |
| 17112 | +template<int> struct X { }; |
| 17113 | + |
| 17114 | +void fu(int a, X<sizeof(a)>) { } |
| 17115 | + |
| 17116 | +template<class T> |
| 17117 | +void bhar(T a, X<sizeof(a)>) { } |
| 17118 | + |
| 17119 | +int |
| 17120 | +main() |
| 17121 | +{ |
| 17122 | + int x; |
| 17123 | + X<sizeof(int)> y; |
| 17124 | + fu(x, y); |
| 17125 | + bhar(x, y); |
| 17126 | +} |
| 17127 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-1.C gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-1.C |
| 17128 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-1.C 1969-12-31 16:00:00.000000000 -0800 |
| 17129 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-1.C 2009-05-30 06:49:33.000000000 -0700 |
| 17130 | @@ -0,0 +1,18 @@ |
| 17131 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17132 | +// Origin PR c++/39754 |
| 17133 | +// { dg-do "compile" } |
| 17134 | + |
| 17135 | +template < typename > struct A ; |
| 17136 | +template < typename T , typename = A < T > > struct B { } ; |
| 17137 | +template < class W , class > struct D |
| 17138 | +{ |
| 17139 | + typedef W X ; |
| 17140 | + A<X*> a ; |
| 17141 | +}; |
| 17142 | + |
| 17143 | +template < class Y > struct E |
| 17144 | +{ |
| 17145 | + B<Y*> b ; |
| 17146 | +} ; |
| 17147 | +E<int> e ; |
| 17148 | + |
| 17149 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-2.C gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-2.C |
| 17150 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-2.C 1969-12-31 16:00:00.000000000 -0800 |
| 17151 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-2.C 2009-05-30 06:49:33.000000000 -0700 |
| 17152 | @@ -0,0 +1,18 @@ |
| 17153 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17154 | +// Origin PR c++/39754 |
| 17155 | +// { dg-do "compile" } |
| 17156 | + |
| 17157 | +template < typename > struct A ; |
| 17158 | +template < typename T , typename = A < T > > struct B { } ; |
| 17159 | +template < class W , class > struct D |
| 17160 | +{ |
| 17161 | + typedef W X ; |
| 17162 | + A< X()> a ; |
| 17163 | +}; |
| 17164 | + |
| 17165 | +template < class Y > struct E |
| 17166 | +{ |
| 17167 | + B< Y()> b ; |
| 17168 | +}; |
| 17169 | +E<int> e ; |
| 17170 | + |
| 17171 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-3.C gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-3.C |
| 17172 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-3.C 1969-12-31 16:00:00.000000000 -0800 |
| 17173 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-3.C 2009-05-30 06:49:33.000000000 -0700 |
| 17174 | @@ -0,0 +1,20 @@ |
| 17175 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17176 | +// Origin PR c++/39754 |
| 17177 | +// { dg-do "compile" } |
| 17178 | + |
| 17179 | +template<typename> struct A ; |
| 17180 | +template<typename T , typename = A<T> > struct B { } ; |
| 17181 | +template<class W , class > struct D |
| 17182 | +{ |
| 17183 | + typedef W X ; |
| 17184 | + typedef X (FP) (); |
| 17185 | + A<FP&> a ; |
| 17186 | +} ; |
| 17187 | + |
| 17188 | +template < class Y > struct E |
| 17189 | +{ |
| 17190 | + typedef Y (FP) (); |
| 17191 | + B<FP&> b ; |
| 17192 | +} ; |
| 17193 | +E < int > e ; |
| 17194 | + |
| 17195 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-4.C gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-4.C |
| 17196 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-4.C 1969-12-31 16:00:00.000000000 -0800 |
| 17197 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-4.C 2009-05-30 06:49:33.000000000 -0700 |
| 17198 | @@ -0,0 +1,22 @@ |
| 17199 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17200 | +// Origin PR c++/39754 |
| 17201 | +// { dg-do "compile" } |
| 17202 | + |
| 17203 | +template<typename> struct A ; |
| 17204 | +template<typename T ,typename = A<T> > struct B { } ; |
| 17205 | + |
| 17206 | +template<class W, class> |
| 17207 | +struct D |
| 17208 | +{ |
| 17209 | + typedef W X; |
| 17210 | + A<X[2]> a; |
| 17211 | +} ; |
| 17212 | + |
| 17213 | +template<class Y> |
| 17214 | +struct E |
| 17215 | +{ |
| 17216 | + B<Y[2]> b; |
| 17217 | +}; |
| 17218 | + |
| 17219 | +E < int > e; |
| 17220 | + |
| 17221 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-5.C gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-5.C |
| 17222 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-5.C 1969-12-31 16:00:00.000000000 -0800 |
| 17223 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-5.C 2009-05-30 06:49:33.000000000 -0700 |
| 17224 | @@ -0,0 +1,22 @@ |
| 17225 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17226 | +// Origin PR c++/39754 |
| 17227 | +// { dg-do "compile" } |
| 17228 | + |
| 17229 | +struct Foo {}; |
| 17230 | +template<typename> struct A ; |
| 17231 | +template<typename T ,typename = A<T> > struct B { } ; |
| 17232 | + |
| 17233 | +template<class W, class> |
| 17234 | +struct D |
| 17235 | +{ |
| 17236 | + typedef W X ; |
| 17237 | + A<X Foo::*> a ; |
| 17238 | +} ; |
| 17239 | + |
| 17240 | +template<class Y> |
| 17241 | +struct E |
| 17242 | +{ |
| 17243 | + B<Y Foo::*> b ; |
| 17244 | +} ; |
| 17245 | +E < int > e ; |
| 17246 | + |
| 17247 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-6.C gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-6.C |
| 17248 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-6.C 1969-12-31 16:00:00.000000000 -0800 |
| 17249 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-6.C 2009-05-30 06:49:33.000000000 -0700 |
| 17250 | @@ -0,0 +1,22 @@ |
| 17251 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17252 | +// Origin PR c++/39754 |
| 17253 | +// { dg-do "compile" } |
| 17254 | + |
| 17255 | +struct Foo {}; |
| 17256 | +template<typename> struct A ; |
| 17257 | +template<typename T ,typename = A<T> > struct B { } ; |
| 17258 | + |
| 17259 | +template<class W, class> |
| 17260 | +struct D |
| 17261 | +{ |
| 17262 | + typedef W X; |
| 17263 | + A<void (Foo::*) (X)> a; |
| 17264 | +} ; |
| 17265 | + |
| 17266 | +template<class Y> |
| 17267 | +struct E |
| 17268 | +{ |
| 17269 | + B<void (Foo::*) (Y)> b; |
| 17270 | +}; |
| 17271 | +E < int > e ; |
| 17272 | + |
| 17273 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-7.C gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-7.C |
| 17274 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/canon-type-7.C 1969-12-31 16:00:00.000000000 -0800 |
| 17275 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/canon-type-7.C 2009-05-30 06:49:33.000000000 -0700 |
| 17276 | @@ -0,0 +1,21 @@ |
| 17277 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17278 | +// Origin PR c++/39754 |
| 17279 | +// { dg-do "compile" } |
| 17280 | + |
| 17281 | +struct Foo {}; |
| 17282 | +template<typename> struct A ; |
| 17283 | +template<typename T ,typename = A<T> > struct B { } ; |
| 17284 | + |
| 17285 | +template<class W, class> |
| 17286 | +struct D |
| 17287 | +{ |
| 17288 | + typedef W X; |
| 17289 | + A<X (Foo::*) (X)> a ; |
| 17290 | +}; |
| 17291 | + |
| 17292 | +template<class Y> |
| 17293 | +struct E |
| 17294 | +{ |
| 17295 | + B<Y (Foo::*) (Y)> b ; |
| 17296 | +}; |
| 17297 | +E<int> e ; |
| 17298 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/dtor6.C gcc-4.4.0/gcc/testsuite/g++.dg/template/dtor6.C |
| 17299 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/dtor6.C 1969-12-31 16:00:00.000000000 -0800 |
| 17300 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/dtor6.C 2009-05-17 13:34:30.000000000 -0700 |
| 17301 | @@ -0,0 +1,10 @@ |
| 17302 | +// PR c++/40139 |
| 17303 | + |
| 17304 | +template<int> struct A |
| 17305 | +{ |
| 17306 | + static int i; |
| 17307 | +}; |
| 17308 | + |
| 17309 | +template<int N> int A<N>::i = { A::~A }; // { dg-error "" } |
| 17310 | + |
| 17311 | +template class A<0>; |
| 17312 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/typedef18.C gcc-4.4.0/gcc/testsuite/g++.dg/template/typedef18.C |
| 17313 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/typedef18.C 1969-12-31 16:00:00.000000000 -0800 |
| 17314 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/typedef18.C 2009-05-30 06:49:33.000000000 -0700 |
| 17315 | @@ -0,0 +1,24 @@ |
| 17316 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17317 | +// Origin PR c++/40007 |
| 17318 | +// { dg-do compile } |
| 17319 | + |
| 17320 | +template<typename T> |
| 17321 | +struct x |
| 17322 | +{ |
| 17323 | + protected: |
| 17324 | + typedef int type; |
| 17325 | +}; |
| 17326 | + |
| 17327 | +template<typename T> |
| 17328 | +struct y : public x<T> |
| 17329 | +{ |
| 17330 | + typename x<T>::type z; |
| 17331 | +}; |
| 17332 | + |
| 17333 | +template<> |
| 17334 | +struct y<void> : public x<void> |
| 17335 | +{ |
| 17336 | + typedef x<void>::type z; |
| 17337 | +}; |
| 17338 | + |
| 17339 | +template class y<int>; |
| 17340 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/typedef19.C gcc-4.4.0/gcc/testsuite/g++.dg/template/typedef19.C |
| 17341 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/typedef19.C 1969-12-31 16:00:00.000000000 -0800 |
| 17342 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/typedef19.C 2009-05-30 16:46:31.000000000 -0700 |
| 17343 | @@ -0,0 +1,21 @@ |
| 17344 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17345 | +// Origin PR c++/40007 |
| 17346 | +// { dg-do compile } |
| 17347 | + |
| 17348 | +class A |
| 17349 | +{ |
| 17350 | + typedef int mytype; // { dg-error "'typedef int A::mytype' is private" "" { xfail *-*-* } } |
| 17351 | +}; |
| 17352 | + |
| 17353 | +template <class T> |
| 17354 | +class B : public A |
| 17355 | +{ |
| 17356 | +}; |
| 17357 | + |
| 17358 | +template<class T> |
| 17359 | +class B<T*> : public A |
| 17360 | +{ // { dg-error "within this context" "" { xfail *-*-* } } |
| 17361 | + mytype mem; |
| 17362 | +}; |
| 17363 | + |
| 17364 | +B<int*> b; |
| 17365 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/typedef20.C gcc-4.4.0/gcc/testsuite/g++.dg/template/typedef20.C |
| 17366 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/template/typedef20.C 1969-12-31 16:00:00.000000000 -0800 |
| 17367 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/template/typedef20.C 2009-05-30 16:46:31.000000000 -0700 |
| 17368 | @@ -0,0 +1,27 @@ |
| 17369 | +// Contributed by Dodji Seketeli <dodji@redhat.com> |
| 17370 | +// Origin PR c++/40007 |
| 17371 | +// { dg-do compile } |
| 17372 | + |
| 17373 | +class x |
| 17374 | +{ |
| 17375 | + typedef int privtype; // { dg-error "is private" "" { xfail *-*-* } } |
| 17376 | + |
| 17377 | +protected: |
| 17378 | + typedef int type; |
| 17379 | +}; |
| 17380 | + |
| 17381 | +template<typename T> |
| 17382 | +struct y : public x |
| 17383 | +{ |
| 17384 | + typename x::type z; |
| 17385 | +}; |
| 17386 | + |
| 17387 | +template<typename T> |
| 17388 | +struct y<T*> : public x |
| 17389 | +{ // { dg-error "within this context" "" { xfail *-*-* } } |
| 17390 | + typedef x::type good; |
| 17391 | + typedef x::privtype bad; |
| 17392 | +}; |
| 17393 | + |
| 17394 | +template class y<int>; |
| 17395 | +template class y<int*>; |
| 17396 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/torture/20070621-1.C gcc-4.4.0/gcc/testsuite/g++.dg/torture/20070621-1.C |
| 17397 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/torture/20070621-1.C 2007-06-21 05:00:47.000000000 -0700 |
| 17398 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/torture/20070621-1.C 2009-05-28 02:37:31.000000000 -0700 |
| 17399 | @@ -6,7 +6,7 @@ |
| 17400 | |
| 17401 | */ |
| 17402 | |
| 17403 | -typedef long int ptrdiff_t; |
| 17404 | +__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t; |
| 17405 | namespace std __attribute__ ((__visibility__ ("default"))) { |
| 17406 | template<typename, typename> struct __are_same { |
| 17407 | enum { |
| 17408 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/torture/pr34222.C gcc-4.4.0/gcc/testsuite/g++.dg/torture/pr34222.C |
| 17409 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/torture/pr34222.C 2007-12-04 09:20:34.000000000 -0800 |
| 17410 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/torture/pr34222.C 2009-05-28 02:37:31.000000000 -0700 |
| 17411 | @@ -3,7 +3,7 @@ |
| 17412 | namespace std __attribute__ ((__visibility__ ("default"))) { |
| 17413 | template<class _CharT> struct char_traits; |
| 17414 | } |
| 17415 | -typedef long int ptrdiff_t; |
| 17416 | +__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t; |
| 17417 | namespace std __attribute__ ((__visibility__ ("default"))) { |
| 17418 | typedef ptrdiff_t streamsize; |
| 17419 | template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ifstream; |
| 17420 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/torture/pr34850.C gcc-4.4.0/gcc/testsuite/g++.dg/torture/pr34850.C |
| 17421 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/torture/pr34850.C 2008-01-21 01:34:19.000000000 -0800 |
| 17422 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/torture/pr34850.C 2009-05-28 02:37:31.000000000 -0700 |
| 17423 | @@ -5,7 +5,7 @@ |
| 17424 | typedef unsigned int uint32_t; |
| 17425 | typedef uint8_t byte; |
| 17426 | typedef uint32_t u32bit; |
| 17427 | -typedef unsigned int size_t; |
| 17428 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 17429 | extern "C" { |
| 17430 | extern void __warn_memset_zero_len (void) __attribute__((__warning__ (""))); |
| 17431 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) |
| 17432 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/torture/pr40335.C gcc-4.4.0/gcc/testsuite/g++.dg/torture/pr40335.C |
| 17433 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/torture/pr40335.C 1969-12-31 16:00:00.000000000 -0800 |
| 17434 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/torture/pr40335.C 2009-06-04 05:37:48.000000000 -0700 |
| 17435 | @@ -0,0 +1,16 @@ |
| 17436 | +/* { dg-do run } */ |
| 17437 | + |
| 17438 | +extern "C" void abort (void); |
| 17439 | +int |
| 17440 | +main (void) |
| 17441 | +{ |
| 17442 | + int i = -1; |
| 17443 | + switch ((signed char) i) |
| 17444 | + { |
| 17445 | + case 255: /* { dg-bogus "exceeds maximum value" "" { xfail *-*-* } } */ |
| 17446 | + abort (); |
| 17447 | + default: |
| 17448 | + break; |
| 17449 | + } |
| 17450 | +} |
| 17451 | + |
| 17452 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/tree-ssa/pr22444.C gcc-4.4.0/gcc/testsuite/g++.dg/tree-ssa/pr22444.C |
| 17453 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/tree-ssa/pr22444.C 2007-03-30 12:45:57.000000000 -0700 |
| 17454 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/tree-ssa/pr22444.C 2009-05-28 02:37:31.000000000 -0700 |
| 17455 | @@ -4,8 +4,8 @@ |
| 17456 | // with the subvars leading to the subvars not being renamed when they should |
| 17457 | // { dg-do compile } |
| 17458 | // { dg-options "-O2" } |
| 17459 | -typedef int ptrdiff_t; |
| 17460 | -typedef unsigned int size_t; |
| 17461 | +__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t; |
| 17462 | +__extension__ typedef __SIZE_TYPE__ size_t; |
| 17463 | namespace std |
| 17464 | { |
| 17465 | template<class _T1, class _T2> struct pair |
| 17466 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/warn/Wuninitialized-4.C gcc-4.4.0/gcc/testsuite/g++.dg/warn/Wuninitialized-4.C |
| 17467 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/warn/Wuninitialized-4.C 1969-12-31 16:00:00.000000000 -0800 |
| 17468 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/warn/Wuninitialized-4.C 2009-05-12 09:19:29.000000000 -0700 |
| 17469 | @@ -0,0 +1,22 @@ |
| 17470 | +// PR middle-end/39666 |
| 17471 | +// { dg-do compile } |
| 17472 | +// { dg-options "-O2 -Wuninitialized" } |
| 17473 | + |
| 17474 | +int |
| 17475 | +foo (int i) |
| 17476 | +{ |
| 17477 | + int j; |
| 17478 | + switch (i) |
| 17479 | + { |
| 17480 | + case -__INT_MAX__ - 1 ... -1: |
| 17481 | + j = 6; |
| 17482 | + break; |
| 17483 | + case 0: |
| 17484 | + j = 5; |
| 17485 | + break; |
| 17486 | + case 1 ... __INT_MAX__: |
| 17487 | + j = 4; |
| 17488 | + break; |
| 17489 | + } |
| 17490 | + return j; |
| 17491 | +} |
| 17492 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/g++.dg/warn/Wuninitialized-5.C gcc-4.4.0/gcc/testsuite/g++.dg/warn/Wuninitialized-5.C |
| 17493 | --- gcc-4.4.0.orig/gcc/testsuite/g++.dg/warn/Wuninitialized-5.C 1969-12-31 16:00:00.000000000 -0800 |
| 17494 | +++ gcc-4.4.0/gcc/testsuite/g++.dg/warn/Wuninitialized-5.C 2009-05-12 09:19:29.000000000 -0700 |
| 17495 | @@ -0,0 +1,22 @@ |
| 17496 | +// PR middle-end/39666 |
| 17497 | +// { dg-do compile } |
| 17498 | +// { dg-options "-O2 -Wuninitialized" } |
| 17499 | + |
| 17500 | +int |
| 17501 | +foo (int i) |
| 17502 | +{ |
| 17503 | + int j; // { dg-warning "may be used uninitialized" } |
| 17504 | + switch (i) |
| 17505 | + { |
| 17506 | + case -__INT_MAX__ - 1 ... -1: |
| 17507 | + j = 6; |
| 17508 | + break; |
| 17509 | + case 0: |
| 17510 | + j = 5; |
| 17511 | + break; |
| 17512 | + case 2 ... __INT_MAX__: |
| 17513 | + j = 4; |
| 17514 | + break; |
| 17515 | + } |
| 17516 | + return j; |
| 17517 | +} |
| 17518 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gfortran.dg/alloc_comp_assign_10.f90 gcc-4.4.0/gcc/testsuite/gfortran.dg/alloc_comp_assign_10.f90 |
| 17519 | --- gcc-4.4.0.orig/gcc/testsuite/gfortran.dg/alloc_comp_assign_10.f90 1969-12-31 16:00:00.000000000 -0800 |
| 17520 | +++ gcc-4.4.0/gcc/testsuite/gfortran.dg/alloc_comp_assign_10.f90 2009-05-10 03:44:22.000000000 -0700 |
| 17521 | @@ -0,0 +1,61 @@ |
| 17522 | +! { dg-do run } |
| 17523 | +! |
| 17524 | +! Test the fix for PR39879, in which gfc gagged on the double |
| 17525 | +! defined assignment where the rhs had a default initialiser. |
| 17526 | +! |
| 17527 | +! Contributed by David Sagan <david.sagan@gmail.com> |
| 17528 | +! |
| 17529 | +module test_struct |
| 17530 | + interface assignment (=) |
| 17531 | + module procedure tao_lat_equal_tao_lat |
| 17532 | + end interface |
| 17533 | + type bunch_params_struct |
| 17534 | + integer n_live_particle |
| 17535 | + end type |
| 17536 | + type tao_lattice_struct |
| 17537 | + type (bunch_params_struct), allocatable :: bunch_params(:) |
| 17538 | + type (bunch_params_struct), allocatable :: bunch_params2(:) |
| 17539 | + end type |
| 17540 | + type tao_universe_struct |
| 17541 | + type (tao_lattice_struct), pointer :: model, design |
| 17542 | + character(200), pointer :: descrip => NULL() |
| 17543 | + end type |
| 17544 | + type tao_super_universe_struct |
| 17545 | + type (tao_universe_struct), allocatable :: u(:) |
| 17546 | + end type |
| 17547 | + type (tao_super_universe_struct), save, target :: s |
| 17548 | + contains |
| 17549 | + subroutine tao_lat_equal_tao_lat (lat1, lat2) |
| 17550 | + implicit none |
| 17551 | + type (tao_lattice_struct), intent(inout) :: lat1 |
| 17552 | + type (tao_lattice_struct), intent(in) :: lat2 |
| 17553 | + if (allocated(lat2%bunch_params)) then |
| 17554 | + lat1%bunch_params = lat2%bunch_params |
| 17555 | + end if |
| 17556 | + if (allocated(lat2%bunch_params2)) then |
| 17557 | + lat1%bunch_params2 = lat2%bunch_params2 |
| 17558 | + end if |
| 17559 | + end subroutine |
| 17560 | +end module |
| 17561 | + |
| 17562 | +program tao_program |
| 17563 | + use test_struct |
| 17564 | + implicit none |
| 17565 | + type (tao_universe_struct), pointer :: u |
| 17566 | + integer n, i |
| 17567 | + allocate (s%u(1)) |
| 17568 | + u => s%u(1) |
| 17569 | + allocate (u%design, u%model) |
| 17570 | + n = 112 |
| 17571 | + allocate (u%model%bunch_params(0:n), u%design%bunch_params(0:n)) |
| 17572 | + u%design%bunch_params%n_live_particle = [(i, i = 0, n)] |
| 17573 | + u%model = u%design |
| 17574 | + u%model = u%design ! The double assignment was the cause of the ICE |
| 17575 | + if (.not. allocated (u%model%bunch_params)) call abort |
| 17576 | + if (any (u%model%bunch_params%n_live_particle .ne. [(i, i = 0, n)])) call abort |
| 17577 | + Deallocate (u%model%bunch_params, u%design%bunch_params) |
| 17578 | + deallocate (u%design, u%model) |
| 17579 | + deallocate (s%u) |
| 17580 | +end program |
| 17581 | + |
| 17582 | +! { dg-final { cleanup-modules "test_struct" } } |
| 17583 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gfortran.dg/array_constructor_31.f90 gcc-4.4.0/gcc/testsuite/gfortran.dg/array_constructor_31.f90 |
| 17584 | --- gcc-4.4.0.orig/gcc/testsuite/gfortran.dg/array_constructor_31.f90 1969-12-31 16:00:00.000000000 -0800 |
| 17585 | +++ gcc-4.4.0/gcc/testsuite/gfortran.dg/array_constructor_31.f90 2009-05-10 09:14:37.000000000 -0700 |
| 17586 | @@ -0,0 +1,10 @@ |
| 17587 | +! { dg-do compile } |
| 17588 | +! Test the fix for pr40018 in which the elements in the array |
| 17589 | +! constructor would be of default type and this would cause an |
| 17590 | +! ICE in the backend because of the type mistmatch with 'i'. |
| 17591 | +! |
| 17592 | +! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
| 17593 | +! |
| 17594 | + integer(kind=8) :: i |
| 17595 | + write(*,*) [(i, i = 1, 10)] |
| 17596 | + end |
| 17597 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gfortran.dg/assumed_charlen_dummy.f90 gcc-4.4.0/gcc/testsuite/gfortran.dg/assumed_charlen_dummy.f90 |
| 17598 | --- gcc-4.4.0.orig/gcc/testsuite/gfortran.dg/assumed_charlen_dummy.f90 1969-12-31 16:00:00.000000000 -0800 |
| 17599 | +++ gcc-4.4.0/gcc/testsuite/gfortran.dg/assumed_charlen_dummy.f90 2009-06-04 10:01:45.000000000 -0700 |
| 17600 | @@ -0,0 +1,10 @@ |
| 17601 | +! { dg-do compile } |
| 17602 | +! Test the fix for PR fortran/39893. |
| 17603 | +! Original testcase provided by Deji Akingunola. |
| 17604 | +! Reduced testcase provided by Dominique d'Humieres. |
| 17605 | +! |
| 17606 | + SUBROUTINE XAUTOGET() |
| 17607 | + CHARACTER*(*) DICBA ! { dg-error "Entity with assumed character" } |
| 17608 | + DATA DICBA /"CLIP" / |
| 17609 | + RETURN |
| 17610 | + END |
| 17834 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gfortran.dg/leadz_trailz_1.f90 gcc-4.4.0/gcc/testsuite/gfortran.dg/leadz_trailz_1.f90 |
| 17835 | --- gcc-4.4.0.orig/gcc/testsuite/gfortran.dg/leadz_trailz_1.f90 1969-12-31 16:00:00.000000000 -0800 |
| 17836 | +++ gcc-4.4.0/gcc/testsuite/gfortran.dg/leadz_trailz_1.f90 2009-06-03 12:39:09.000000000 -0700 |
| 17837 | @@ -0,0 +1,133 @@ |
| 17838 | +! { dg-do run } |
| 17839 | + |
| 17840 | + integer(kind=1) :: i1 |
| 17841 | + integer(kind=2) :: i2 |
| 17842 | + integer(kind=4) :: i4 |
| 17843 | + integer(kind=8) :: i8 |
| 17844 | + |
| 17845 | + i1 = -1 |
| 17846 | + i2 = -1 |
| 17847 | + i4 = -1 |
| 17848 | + i8 = -1 |
| 17849 | + |
| 17850 | + if (leadz(i1) /= 0) call abort |
| 17851 | + if (leadz(i2) /= 0) call abort |
| 17852 | + if (leadz(i4) /= 0) call abort |
| 17853 | + if (leadz(i8) /= 0) call abort |
| 17854 | + |
| 17855 | + if (trailz(i1) /= 0) call abort |
| 17856 | + if (trailz(i2) /= 0) call abort |
| 17857 | + if (trailz(i4) /= 0) call abort |
| 17858 | + if (trailz(i8) /= 0) call abort |
| 17859 | + |
| 17860 | + if (leadz(-1_1) /= 0) call abort |
| 17861 | + if (leadz(-1_2) /= 0) call abort |
| 17862 | + if (leadz(-1_4) /= 0) call abort |
| 17863 | + if (leadz(-1_8) /= 0) call abort |
| 17864 | + |
| 17865 | + if (trailz(-1_1) /= 0) call abort |
| 17866 | + if (trailz(-1_2) /= 0) call abort |
| 17867 | + if (trailz(-1_4) /= 0) call abort |
| 17868 | + if (trailz(-1_8) /= 0) call abort |
| 17869 | + |
| 17870 | + i1 = -64 |
| 17871 | + i2 = -64 |
| 17872 | + i4 = -64 |
| 17873 | + i8 = -64 |
| 17874 | + |
| 17875 | + if (leadz(i1) /= 0) call abort |
| 17876 | + if (leadz(i2) /= 0) call abort |
| 17877 | + if (leadz(i4) /= 0) call abort |
| 17878 | + if (leadz(i8) /= 0) call abort |
| 17879 | + |
| 17880 | + if (trailz(i1) /= 6) call abort |
| 17881 | + if (trailz(i2) /= 6) call abort |
| 17882 | + if (trailz(i4) /= 6) call abort |
| 17883 | + if (trailz(i8) /= 6) call abort |
| 17884 | + |
| 17885 | + if (leadz(-64_1) /= 0) call abort |
| 17886 | + if (leadz(-64_2) /= 0) call abort |
| 17887 | + if (leadz(-64_4) /= 0) call abort |
| 17888 | + if (leadz(-64_8) /= 0) call abort |
| 17889 | + |
| 17890 | + if (trailz(-64_1) /= 6) call abort |
| 17891 | + if (trailz(-64_2) /= 6) call abort |
| 17892 | + if (trailz(-64_4) /= 6) call abort |
| 17893 | + if (trailz(-64_8) /= 6) call abort |
| 17894 | + |
| 17895 | + i1 = -108 |
| 17896 | + i2 = -108 |
| 17897 | + i4 = -108 |
| 17898 | + i8 = -108 |
| 17899 | + |
| 17900 | + if (leadz(i1) /= 0) call abort |
| 17901 | + if (leadz(i2) /= 0) call abort |
| 17902 | + if (leadz(i4) /= 0) call abort |
| 17903 | + if (leadz(i8) /= 0) call abort |
| 17904 | + |
| 17905 | + if (trailz(i1) /= 2) call abort |
| 17906 | + if (trailz(i2) /= 2) call abort |
| 17907 | + if (trailz(i4) /= 2) call abort |
| 17908 | + if (trailz(i8) /= 2) call abort |
| 17909 | + |
| 17910 | + if (leadz(-108_1) /= 0) call abort |
| 17911 | + if (leadz(-108_2) /= 0) call abort |
| 17912 | + if (leadz(-108_4) /= 0) call abort |
| 17913 | + if (leadz(-108_8) /= 0) call abort |
| 17914 | + |
| 17915 | + if (trailz(-108_1) /= 2) call abort |
| 17916 | + if (trailz(-108_2) /= 2) call abort |
| 17917 | + if (trailz(-108_4) /= 2) call abort |
| 17918 | + if (trailz(-108_8) /= 2) call abort |
| 17919 | + |
| 17920 | + i1 = 1 |
| 17921 | + i2 = 1 |
| 17922 | + i4 = 1 |
| 17923 | + i8 = 1 |
| 17924 | + |
| 17925 | + if (leadz(i1) /= bit_size(i1) - 1) call abort |
| 17926 | + if (leadz(i2) /= bit_size(i2) - 1) call abort |
| 17927 | + if (leadz(i4) /= bit_size(i4) - 1) call abort |
| 17928 | + if (leadz(i8) /= bit_size(i8) - 1) call abort |
| 17929 | + |
| 17930 | + if (trailz(i1) /= 0) call abort |
| 17931 | + if (trailz(i2) /= 0) call abort |
| 17932 | + if (trailz(i4) /= 0) call abort |
| 17933 | + if (trailz(i8) /= 0) call abort |
| 17934 | + |
| 17935 | + if (leadz(1_1) /= bit_size(1_1) - 1) call abort |
| 17936 | + if (leadz(1_2) /= bit_size(1_2) - 1) call abort |
| 17937 | + if (leadz(1_4) /= bit_size(1_4) - 1) call abort |
| 17938 | + if (leadz(1_8) /= bit_size(1_8) - 1) call abort |
| 17939 | + |
| 17940 | + if (trailz(1_1) /= 0) call abort |
| 17941 | + if (trailz(1_2) /= 0) call abort |
| 17942 | + if (trailz(1_4) /= 0) call abort |
| 17943 | + if (trailz(1_8) /= 0) call abort |
| 17944 | + |
| 17945 | + i1 = 64 |
| 17946 | + i2 = 64 |
| 17947 | + i4 = 64 |
| 17948 | + i8 = 64 |
| 17949 | + |
| 17950 | + if (leadz(i1) /= 1) call abort |
| 17951 | + if (leadz(i2) /= 9) call abort |
| 17952 | + if (leadz(i4) /= 25) call abort |
| 17953 | + if (leadz(i8) /= 57) call abort |
| 17954 | + |
| 17955 | + if (trailz(i1) /= 6) call abort |
| 17956 | + if (trailz(i2) /= 6) call abort |
| 17957 | + if (trailz(i4) /= 6) call abort |
| 17958 | + if (trailz(i8) /= 6) call abort |
| 17959 | + |
| 17960 | + if (leadz(64_1) /= 1) call abort |
| 17961 | + if (leadz(64_2) /= 9) call abort |
| 17962 | + if (leadz(64_4) /= 25) call abort |
| 17963 | + if (leadz(64_8) /= 57) call abort |
| 17964 | + |
| 17965 | + if (trailz(64_1) /= 6) call abort |
| 17966 | + if (trailz(64_2) /= 6) call abort |
| 17967 | + if (trailz(64_4) /= 6) call abort |
| 17968 | + if (trailz(64_8) /= 6) call abort |
| 17969 | + |
| 17970 | +end |
| 17971 | diff -Naur gcc-4.4.0.orig/gcc/testsuite/gfortran.dg/leadz_trailz_2.f90 gcc-4.4.0/gcc/testsuite/gfortran.dg/leadz_trailz_2.f90 |
| 17972 | --- gcc-4.4.0.orig/gcc/testsuite/gfortran.dg/leadz_trailz_2.f90 1969-12-31 16:00:00.000000000 -0800 |
| 17973 | +++ gcc-4.4.0/gcc/testsuite/gfortran.dg/leadz_trailz_2.f90 2009-06-03 12:39:09.000000000 -0700 |
| 17974 | @@ -0,0 +1,36 @@ |
| 17975 | +! { dg-do run } |
| 17976 | +! { dg-require-effective-target fortran_large_int } |
| 17977 | + |
| 17978 | + integer(kind=16) :: i16 |
| 17979 | + |
| 17980 | + i16 = -1 |
| 17981 | + if (leadz(i16) /= 0) call abort |
| 17982 | + if (trailz(i16) /= 0) call abort |
| 17983 | + if (leadz(-1_16) /= 0) call abort |
| 17984 | + if (trailz(-1_16) /= 0) call abort |
| 17985 | + |
| 17986 | + i16 = -64 |
| 17987 | + if (leadz(i16) /= 0) call abort |
| 17988 | + if (trailz(i16) /= 6) call abort |
| 17989 | + if (leadz(-64_16) /= 0) call abort |
| 17990 | + if (trailz(-64_16) /= 6) call abort |
| 17991 | + |
| 17992 | + i16 = -108 |
| 17993 | + if (leadz(i16) /= 0) call abort |
| 17994 | + if (trailz(i16) /= 2) call abort |
| 17995 | + if (leadz(-108_16) /= 0) call abort |
| 17996 | + if (trailz(-108_16) /= 2) call abort |
| 17997 | + |
| 17998 | + i16 = 1 |
| 17999 | + if (leadz(i16) /= bit_size(i16) - 1) call abort |
| 18000 | + if (trailz(i16) /= 0) call abort |
| 18001 | + if (leadz(1_16) /= bit_size(1_16) - 1) call abort |
| 18002 | + if (trailz(1_16) /= 0) call abort |
| 18003 | + |
| 18004 | + i16 = 64 |
| 18005 | + if (leadz(i16) /= 121) call abort |
| 18006 | + if (trailz(i16) /= 6) call abort |
| 18007 | + if (leadz(64_16) /= 121) call abort |
| 18008 | + if (trailz(64_16) /= 6) call abort |
| 18009 | + |
| 18010 | +end |
| 18693 | @@ -678,6 +680,12 @@ |
| 18694 | var_ann_t ann; |
| 18695 | bitmap global_unused_vars = NULL; |
| 18696 | |
| 18697 | + /* Removing declarations from lexical blocks when not optimizing is |
| 18698 | + not only a waste of time, it actually causes differences in stack |
| 18699 | + layout. */ |
| 18700 | + if (!optimize) |
| 18701 | + return; |
| 18702 | + |
| 18703 | mark_scope_block_unused (DECL_INITIAL (current_function_decl)); |
| 18704 | |
| 18705 | /* Assume all locals are unused. */ |
| 18706 | @@ -740,8 +748,7 @@ |
| 18707 | |
| 18708 | if (TREE_CODE (var) != FUNCTION_DECL |
| 18709 | && (!(ann = var_ann (var)) |
| 18710 | - || !ann->used) |
| 18711 | - && (optimize || DECL_ARTIFICIAL (var))) |
| 18712 | + || !ann->used)) |
| 18713 | { |
| 18714 | if (is_global_var (var)) |
| 18715 | { |
| 18716 | @@ -802,8 +809,7 @@ |
| 18717 | && TREE_CODE (t) != RESULT_DECL |
| 18718 | && !(ann = var_ann (t))->used |
| 18719 | && !ann->symbol_mem_tag |
| 18720 | - && !TREE_ADDRESSABLE (t) |
| 18721 | - && (optimize || DECL_ARTIFICIAL (t))) |
| 18722 | + && !TREE_ADDRESSABLE (t)) |
| 18723 | remove_referenced_var (t); |
| 18724 | remove_unused_scope_block_p (DECL_INITIAL (current_function_decl)); |
| 18725 | if (dump_file && (dump_flags & TDF_DETAILS)) |
| 18726 | diff -Naur gcc-4.4.0.orig/gcc/tree-ssa-loop-niter.c gcc-4.4.0/gcc/tree-ssa-loop-niter.c |
| 18727 | --- gcc-4.4.0.orig/gcc/tree-ssa-loop-niter.c 2009-03-16 09:07:07.000000000 -0700 |
| 18728 | +++ gcc-4.4.0/gcc/tree-ssa-loop-niter.c 2009-05-22 13:43:39.000000000 -0700 |
| 18729 | @@ -534,7 +534,7 @@ |
| 18730 | } |
| 18731 | |
| 18732 | /* Derives the upper bound BND on the number of executions of loop with exit |
| 18733 | - condition S * i <> C, assuming that the loop is not infinite. If |
| 18734 | + condition S * i <> C, assuming that this exit is taken. If |
| 18735 | NO_OVERFLOW is true, then the control variable of the loop does not |
| 18736 | overflow. If NO_OVERFLOW is true or BNDS.below >= 0, then BNDS.up |
| 18737 | contains the upper bound on the value of C. */ |
| 18738 | @@ -574,7 +574,7 @@ |
| 18739 | |
| 18740 | /* Determines number of iterations of loop whose ending condition |
| 18741 | is IV <> FINAL. TYPE is the type of the iv. The number of |
| 18742 | - iterations is stored to NITER. NEVER_INFINITE is true if |
| 18743 | + iterations is stored to NITER. EXIT_MUST_BE_TAKEN is true if |
| 18744 | we know that the exit must be taken eventually, i.e., that the IV |
| 18745 | ever reaches the value FINAL (we derived this earlier, and possibly set |
| 18746 | NITER->assumptions to make sure this is the case). BNDS contains the |
| 18747 | @@ -582,7 +582,7 @@ |
| 18748 | |
| 18749 | static bool |
| 18750 | number_of_iterations_ne (tree type, affine_iv *iv, tree final, |
| 18751 | - struct tree_niter_desc *niter, bool never_infinite, |
| 18752 | + struct tree_niter_desc *niter, bool exit_must_be_taken, |
| 18753 | bounds *bnds) |
| 18754 | { |
| 18755 | tree niter_type = unsigned_type_for (type); |
| 18756 | @@ -639,9 +639,9 @@ |
| 18757 | build_int_cst (niter_type, 1), bits); |
| 18758 | s = fold_binary_to_constant (RSHIFT_EXPR, niter_type, s, bits); |
| 18759 | |
| 18760 | - if (!never_infinite) |
| 18761 | + if (!exit_must_be_taken) |
| 18762 | { |
| 18763 | - /* If we cannot assume that the loop is not infinite, record the |
| 18764 | + /* If we cannot assume that the exit is taken eventually, record the |
| 18765 | assumptions for divisibility of c. */ |
| 18766 | assumption = fold_build2 (FLOOR_MOD_EXPR, niter_type, c, d); |
| 18767 | assumption = fold_build2 (EQ_EXPR, boolean_type_node, |
| 18768 | @@ -664,20 +664,21 @@ |
| 18769 | of the final value does not overflow are recorded in NITER. If we |
| 18770 | find the final value, we adjust DELTA and return TRUE. Otherwise |
| 18771 | we return false. BNDS bounds the value of IV1->base - IV0->base, |
| 18772 | - and will be updated by the same amount as DELTA. */ |
| 18773 | + and will be updated by the same amount as DELTA. EXIT_MUST_BE_TAKEN is |
| 18774 | + true if we know that the exit must be taken eventually. */ |
| 18775 | |
| 18776 | static bool |
| 18777 | number_of_iterations_lt_to_ne (tree type, affine_iv *iv0, affine_iv *iv1, |
| 18778 | struct tree_niter_desc *niter, |
| 18779 | tree *delta, tree step, |
| 18780 | - bounds *bnds) |
| 18781 | + bool exit_must_be_taken, bounds *bnds) |
| 18782 | { |
| 18783 | tree niter_type = TREE_TYPE (step); |
| 18784 | tree mod = fold_build2 (FLOOR_MOD_EXPR, niter_type, *delta, step); |
| 18785 | tree tmod; |
| 18786 | mpz_t mmod; |
| 18787 | tree assumption = boolean_true_node, bound, noloop; |
| 18788 | - bool ret = false; |
| 18789 | + bool ret = false, fv_comp_no_overflow; |
| 18790 | tree type1 = type; |
| 18791 | if (POINTER_TYPE_P (type)) |
| 18792 | type1 = sizetype; |
| 18793 | @@ -692,17 +693,31 @@ |
| 18794 | mpz_set_double_int (mmod, tree_to_double_int (mod), true); |
| 18795 | mpz_neg (mmod, mmod); |
| 18796 | |
| 18797 | + /* If the induction variable does not overflow and the exit is taken, |
| 18798 | + then the computation of the final value does not overflow. This is |
| 18799 | + also obviously the case if the new final value is equal to the |
| 18800 | + current one. Finally, we postulate this for pointer type variables, |
| 18801 | + as the code cannot rely on the object to that the pointer points being |
| 18802 | + placed at the end of the address space (and more pragmatically, |
| 18803 | + TYPE_{MIN,MAX}_VALUE is not defined for pointers). */ |
| 18804 | + if (integer_zerop (mod) || POINTER_TYPE_P (type)) |
| 18805 | + fv_comp_no_overflow = true; |
| 18806 | + else if (!exit_must_be_taken) |
| 18807 | + fv_comp_no_overflow = false; |
| 18808 | + else |
| 18809 | + fv_comp_no_overflow = |
| 18810 | + (iv0->no_overflow && integer_nonzerop (iv0->step)) |
| 18811 | + || (iv1->no_overflow && integer_nonzerop (iv1->step)); |
| 18812 | + |
| 18813 | if (integer_nonzerop (iv0->step)) |
| 18814 | { |
| 18815 | /* The final value of the iv is iv1->base + MOD, assuming that this |
| 18816 | computation does not overflow, and that |
| 18817 | iv0->base <= iv1->base + MOD. */ |
| 18818 | - if (!iv0->no_overflow && !integer_zerop (mod)) |
| 18819 | + if (!fv_comp_no_overflow) |
| 18820 | { |
| 18821 | bound = fold_build2 (MINUS_EXPR, type1, |
| 18822 | TYPE_MAX_VALUE (type1), tmod); |
| 18823 | - if (POINTER_TYPE_P (type)) |
| 18824 | - bound = fold_convert (type, bound); |
| 18825 | assumption = fold_build2 (LE_EXPR, boolean_type_node, |
| 18826 | iv1->base, bound); |
| 18827 | if (integer_zerop (assumption)) |
| 18828 | @@ -726,12 +741,10 @@ |
| 18829 | /* The final value of the iv is iv0->base - MOD, assuming that this |
| 18830 | computation does not overflow, and that |
| 18831 | iv0->base - MOD <= iv1->base. */ |
| 18832 | - if (!iv1->no_overflow && !integer_zerop (mod)) |
| 18833 | + if (!fv_comp_no_overflow) |
| 18834 | { |
| 18835 | bound = fold_build2 (PLUS_EXPR, type1, |
| 18836 | TYPE_MIN_VALUE (type1), tmod); |
| 18837 | - if (POINTER_TYPE_P (type)) |
| 18838 | - bound = fold_convert (type, bound); |
| 18839 | assumption = fold_build2 (GE_EXPR, boolean_type_node, |
| 18840 | iv0->base, bound); |
| 18841 | if (integer_zerop (assumption)) |
| 18842 | @@ -969,13 +982,13 @@ |
| 18843 | /* Determines number of iterations of loop whose ending condition |
| 18844 | is IV0 < IV1. TYPE is the type of the iv. The number of |
| 18845 | iterations is stored to NITER. BNDS bounds the difference |
| 18846 | - IV1->base - IV0->base. */ |
| 18847 | + IV1->base - IV0->base. EXIT_MUST_BE_TAKEN is true if we know |
| 18848 | + that the exit must be taken eventually. */ |
| 18849 | |
| 18850 | static bool |
| 18851 | number_of_iterations_lt (tree type, affine_iv *iv0, affine_iv *iv1, |
| 18852 | struct tree_niter_desc *niter, |
| 18853 | - bool never_infinite ATTRIBUTE_UNUSED, |
| 18854 | - bounds *bnds) |
| 18855 | + bool exit_must_be_taken, bounds *bnds) |
| 18856 | { |
| 18857 | tree niter_type = unsigned_type_for (type); |
| 18858 | tree delta, step, s; |
| 18859 | @@ -1034,7 +1047,7 @@ |
| 18860 | transform the condition to != comparison. In particular, this will be |
| 18861 | the case if DELTA is constant. */ |
| 18862 | if (number_of_iterations_lt_to_ne (type, iv0, iv1, niter, &delta, step, |
| 18863 | - bnds)) |
| 18864 | + exit_must_be_taken, bnds)) |
| 18865 | { |
| 18866 | affine_iv zps; |
| 18867 | |
| 18868 | @@ -1076,14 +1089,14 @@ |
| 18869 | |
| 18870 | /* Determines number of iterations of loop whose ending condition |
| 18871 | is IV0 <= IV1. TYPE is the type of the iv. The number of |
| 18872 | - iterations is stored to NITER. NEVER_INFINITE is true if |
| 18873 | + iterations is stored to NITER. EXIT_MUST_BE_TAKEN is true if |
| 18874 | we know that this condition must eventually become false (we derived this |
| 18875 | earlier, and possibly set NITER->assumptions to make sure this |
| 18876 | is the case). BNDS bounds the difference IV1->base - IV0->base. */ |
| 18877 | |
| 18878 | static bool |
| 18879 | number_of_iterations_le (tree type, affine_iv *iv0, affine_iv *iv1, |
| 18880 | - struct tree_niter_desc *niter, bool never_infinite, |
| 18881 | + struct tree_niter_desc *niter, bool exit_must_be_taken, |
| 18882 | bounds *bnds) |
| 18883 | { |
| 18884 | tree assumption; |
| 18885 | @@ -1094,9 +1107,13 @@ |
| 18886 | /* Say that IV0 is the control variable. Then IV0 <= IV1 iff |
| 18887 | IV0 < IV1 + 1, assuming that IV1 is not equal to the greatest |
| 18888 | value of the type. This we must know anyway, since if it is |
| 18889 | - equal to this value, the loop rolls forever. */ |
| 18890 | + equal to this value, the loop rolls forever. We do not check |
| 18891 | + this condition for pointer type ivs, as the code cannot rely on |
| 18892 | + the object to that the pointer points being placed at the end of |
| 18893 | + the address space (and more pragmatically, TYPE_{MIN,MAX}_VALUE is |
| 18894 | + not defined for pointers). */ |
| 18895 | |
| 18896 | - if (!never_infinite) |
| 18897 | + if (!exit_must_be_taken && !POINTER_TYPE_P (type)) |
| 18898 | { |
| 18899 | if (integer_nonzerop (iv0->step)) |
| 18900 | assumption = fold_build2 (NE_EXPR, boolean_type_node, |
| 18901 | @@ -1131,7 +1148,8 @@ |
| 18902 | |
| 18903 | bounds_add (bnds, double_int_one, type1); |
| 18904 | |
| 18905 | - return number_of_iterations_lt (type, iv0, iv1, niter, never_infinite, bnds); |
| 18906 | + return number_of_iterations_lt (type, iv0, iv1, niter, exit_must_be_taken, |
| 18907 | + bnds); |
| 18908 | } |
| 18909 | |
| 18910 | /* Dumps description of affine induction variable IV to FILE. */ |
| 18911 | @@ -1177,7 +1195,7 @@ |
| 18912 | affine_iv *iv1, struct tree_niter_desc *niter, |
| 18913 | bool only_exit) |
| 18914 | { |
| 18915 | - bool never_infinite, ret; |
| 18916 | + bool exit_must_be_taken = false, ret; |
| 18917 | bounds bnds; |
| 18918 | |
| 18919 | /* The meaning of these assumptions is this: |
| 18920 | @@ -1202,42 +1220,27 @@ |
| 18921 | code = swap_tree_comparison (code); |
| 18922 | } |
| 18923 | |
| 18924 | - if (!only_exit) |
| 18925 | - { |
| 18926 | - /* If this is not the only possible exit from the loop, the information |
| 18927 | - that the induction variables cannot overflow as derived from |
| 18928 | - signedness analysis cannot be relied upon. We use them e.g. in the |
| 18929 | - following way: given loop for (i = 0; i <= n; i++), if i is |
| 18930 | - signed, it cannot overflow, thus this loop is equivalent to |
| 18931 | - for (i = 0; i < n + 1; i++); however, if n == MAX, but the loop |
| 18932 | - is exited in some other way before i overflows, this transformation |
| 18933 | - is incorrect (the new loop exits immediately). */ |
| 18934 | - iv0->no_overflow = false; |
| 18935 | - iv1->no_overflow = false; |
| 18936 | - } |
| 18937 | - |
| 18938 | if (POINTER_TYPE_P (type)) |
| 18939 | { |
| 18940 | /* Comparison of pointers is undefined unless both iv0 and iv1 point |
| 18941 | to the same object. If they do, the control variable cannot wrap |
| 18942 | (as wrap around the bounds of memory will never return a pointer |
| 18943 | that would be guaranteed to point to the same object, even if we |
| 18944 | - avoid undefined behavior by casting to size_t and back). The |
| 18945 | - restrictions on pointer arithmetics and comparisons of pointers |
| 18946 | - ensure that using the no-overflow assumptions is correct in this |
| 18947 | - case even if ONLY_EXIT is false. */ |
| 18948 | + avoid undefined behavior by casting to size_t and back). */ |
| 18949 | iv0->no_overflow = true; |
| 18950 | iv1->no_overflow = true; |
| 18951 | } |
| 18952 | |
| 18953 | - /* If the control induction variable does not overflow, the loop obviously |
| 18954 | - cannot be infinite. */ |
| 18955 | - if (!integer_zerop (iv0->step) && iv0->no_overflow) |
| 18956 | - never_infinite = true; |
| 18957 | - else if (!integer_zerop (iv1->step) && iv1->no_overflow) |
| 18958 | - never_infinite = true; |
| 18959 | - else |
| 18960 | - never_infinite = false; |
| 18961 | + /* If the control induction variable does not overflow and the only exit |
| 18962 | + from the loop is the one that we analyze, we know it must be taken |
| 18963 | + eventually. */ |
| 18964 | + if (only_exit) |
| 18965 | + { |
| 18966 | + if (!integer_zerop (iv0->step) && iv0->no_overflow) |
| 18967 | + exit_must_be_taken = true; |
| 18968 | + else if (!integer_zerop (iv1->step) && iv1->no_overflow) |
| 18969 | + exit_must_be_taken = true; |
| 18970 | + } |
| 18971 | |
| 18972 | /* We can handle the case when neither of the sides of the comparison is |
| 18973 | invariant, provided that the test is NE_EXPR. This rarely occurs in |
| 18974 | @@ -1308,16 +1311,16 @@ |
| 18975 | case NE_EXPR: |
| 18976 | gcc_assert (integer_zerop (iv1->step)); |
| 18977 | ret = number_of_iterations_ne (type, iv0, iv1->base, niter, |
| 18978 | - never_infinite, &bnds); |
| 18979 | + exit_must_be_taken, &bnds); |
| 18980 | break; |
| 18981 | |
| 18982 | case LT_EXPR: |
| 18983 | - ret = number_of_iterations_lt (type, iv0, iv1, niter, never_infinite, |
| 18984 | + ret = number_of_iterations_lt (type, iv0, iv1, niter, exit_must_be_taken, |
| 18985 | &bnds); |
| 18986 | break; |
| 18987 | |
| 18988 | case LE_EXPR: |
| 18989 | - ret = number_of_iterations_le (type, iv0, iv1, niter, never_infinite, |
| 18990 | + ret = number_of_iterations_le (type, iv0, iv1, niter, exit_must_be_taken, |
| 18991 | &bnds); |
| 18992 | break; |
| 18993 | |
| 18994 | diff -Naur gcc-4.4.0.orig/gcc/tree-ssa-phiprop.c gcc-4.4.0/gcc/tree-ssa-phiprop.c |
| 18995 | --- gcc-4.4.0.orig/gcc/tree-ssa-phiprop.c 2008-09-11 14:48:11.000000000 -0700 |
| 18996 | +++ gcc-4.4.0/gcc/tree-ssa-phiprop.c 2009-05-06 01:32:24.000000000 -0700 |
| 18997 | @@ -119,8 +119,7 @@ |
| 18998 | FOR_EACH_IMM_USE_STMT (use_stmt, ui2, vuse) |
| 18999 | { |
| 19000 | /* If BB does not dominate a VDEF, the value is invalid. */ |
| 19001 | - if (((is_gimple_assign (use_stmt) |
| 19002 | - && !ZERO_SSA_OPERANDS (use_stmt, SSA_OP_VDEF)) |
| 19003 | + if ((!ZERO_SSA_OPERANDS (use_stmt, SSA_OP_VDEF) |
| 19004 | || gimple_code (use_stmt) == GIMPLE_PHI) |
| 19005 | && !dominated_by_p (CDI_DOMINATORS, gimple_bb (use_stmt), bb)) |
| 19006 | { |
| 19007 | diff -Naur gcc-4.4.0.orig/gcc/tree-ssa-sccvn.c gcc-4.4.0/gcc/tree-ssa-sccvn.c |
| 19008 | --- gcc-4.4.0.orig/gcc/tree-ssa-sccvn.c 2009-04-11 00:42:52.000000000 -0700 |
| 19009 | +++ gcc-4.4.0/gcc/tree-ssa-sccvn.c 2009-05-18 03:13:43.000000000 -0700 |
| 19010 | @@ -1293,7 +1293,7 @@ |
| 19011 | *vnresult = NULL; |
| 19012 | vno1.opcode = gimple_assign_rhs_code (stmt); |
| 19013 | vno1.length = gimple_num_ops (stmt) - 1; |
| 19014 | - vno1.type = TREE_TYPE (gimple_assign_lhs (stmt)); |
| 19015 | + vno1.type = gimple_expr_type (stmt); |
| 19016 | for (i = 0; i < vno1.length; ++i) |
| 19017 | vno1.op[i] = gimple_op (stmt, i + 1); |
| 19018 | if (vno1.opcode == REALPART_EXPR |
| 19019 | @@ -1401,7 +1401,7 @@ |
| 19020 | vno1->value_id = VN_INFO (result)->value_id; |
| 19021 | vno1->opcode = gimple_assign_rhs_code (stmt); |
| 19022 | vno1->length = length; |
| 19023 | - vno1->type = TREE_TYPE (gimple_assign_lhs (stmt)); |
| 19024 | + vno1->type = gimple_expr_type (stmt); |
| 19025 | for (i = 0; i < vno1->length; ++i) |
| 19026 | vno1->op[i] = gimple_op (stmt, i + 1); |
| 19027 | if (vno1->opcode == REALPART_EXPR |
| 19028 | @@ -2142,7 +2142,7 @@ |
| 19029 | fold_defer_overflow_warnings (); |
| 19030 | |
| 19031 | result = fold_binary (gimple_assign_rhs_code (stmt), |
| 19032 | - TREE_TYPE (gimple_get_lhs (stmt)), op0, op1); |
| 19033 | + gimple_expr_type (stmt), op0, op1); |
| 19034 | if (result) |
| 19035 | STRIP_USELESS_TYPE_CONVERSION (result); |
| 19036 | |
| 19037 | diff -Naur gcc-4.4.0.orig/gcc/tree-vect-analyze.c gcc-4.4.0/gcc/tree-vect-analyze.c |
| 19038 | --- gcc-4.4.0.orig/gcc/tree-vect-analyze.c 2009-04-02 11:08:10.000000000 -0700 |
| 19039 | +++ gcc-4.4.0/gcc/tree-vect-analyze.c 2009-05-11 06:55:36.000000000 -0700 |
| 19040 | @@ -2187,7 +2187,7 @@ |
| 19041 | tree next_step; |
| 19042 | tree prev_init = DR_INIT (data_ref); |
| 19043 | gimple prev = stmt; |
| 19044 | - HOST_WIDE_INT diff, count_in_bytes; |
| 19045 | + HOST_WIDE_INT diff, count_in_bytes, gaps = 0; |
| 19046 | |
| 19047 | while (next) |
| 19048 | { |
| 19049 | @@ -2249,6 +2249,8 @@ |
| 19050 | fprintf (vect_dump, "interleaved store with gaps"); |
| 19051 | return false; |
| 19052 | } |
| 19053 | + |
| 19054 | + gaps += diff - 1; |
| 19055 | } |
| 19056 | |
| 19057 | /* Store the gap from the previous member of the group. If there is no |
| 19058 | @@ -2265,8 +2267,9 @@ |
| 19059 | the type to get COUNT_IN_BYTES. */ |
| 19060 | count_in_bytes = type_size * count; |
| 19061 | |
| 19062 | - /* Check that the size of the interleaving is not greater than STEP. */ |
| 19063 | - if (dr_step < count_in_bytes) |
| 19064 | + /* Check that the size of the interleaving (including gaps) is not greater |
| 19065 | + than STEP. */ |
| 19066 | + if (dr_step && dr_step < count_in_bytes + gaps * type_size) |
| 19067 | { |
| 19068 | if (vect_print_dump_info (REPORT_DETAILS)) |
| 19069 | { |
14980 | | diff -Naur gcc-4.4.0.orig/libjava/ChangeLog gcc-4.4.0/libjava/ChangeLog |
14981 | | --- gcc-4.4.0.orig/libjava/ChangeLog 2009-04-21 01:48:20.000000000 -0700 |
14982 | | +++ gcc-4.4.0/libjava/ChangeLog 2009-04-28 05:51:10.000000000 -0700 |
14983 | | @@ -1,3 +1,27 @@ |
14984 | | +2009-04-28 Andrew Haley <aph@redhat.com> |
14985 | | + |
14986 | | + PR libgcj/39899 |
14987 | | + * Makefile.am (libgcj_tools_la_LDFLAGS): Add |
14988 | | + -fno-bootstrap-classes to libgcj_tools_la_GCJFLAGS. |
14989 | | + * Makefile.in: Regenerate. |
14990 | | + |
14991 | | +2009-04-26 Matthias Klose <doko@ubuntu.com> |
14992 | | + |
14993 | | + * contrib/aot-compile.in: Print diagnostics for malformed or invalid |
14994 | | + class files. |
14995 | | + * contrib/generate-cacerts.pl.in: New. |
14996 | | + * configure.ac (AC_CONFIG_FILES): Add generate-cacerts.pl. |
14997 | | + |
14998 | | +2009-04-24 Matthias Klose <doko@ubuntu.com> |
14999 | | + |
15000 | | + * configure.ac: Create missing directory gnu/java/security/jce/prng. |
15001 | | + * configure: Regenerate. |
15002 | | + |
15003 | | +2009-04-23 Matthias Klose <doko@ubuntu.com> |
15004 | | + |
15005 | | + * Makefile.am (install-data-local): Fix symlinks to header files. |
15006 | | + * Makefile.in: Regenerate. |
15007 | | + |
15008 | | 2009-04-21 Release Manager |
15009 | | |
15010 | | * GCC 4.4.0 released. |
| 19623 | diff -Naur gcc-4.4.0.orig/libgfortran/gfortran.map gcc-4.4.0/libgfortran/gfortran.map |
| 19624 | --- gcc-4.4.0.orig/libgfortran/gfortran.map 2008-07-27 03:45:44.000000000 -0700 |
| 19625 | +++ gcc-4.4.0/libgfortran/gfortran.map 2009-06-03 12:39:09.000000000 -0700 |
| 19626 | @@ -1090,6 +1090,13 @@ |
| 19627 | _gfortran_unpack1_char4; |
| 19628 | } GFORTRAN_1.0; |
| 19629 | |
| 19630 | + |
| 19631 | +GFORTRAN_1.2 { |
| 19632 | + global: |
| 19633 | + _gfortran_clz128; |
| 19634 | + _gfortran_ctz128; |
| 19635 | +} GFORTRAN_1.1; |
| 19636 | + |
| 19637 | F2C_1.0 { |
| 19638 | global: |
| 19639 | _gfortran_f2c_specific__abs_c4; |
| 19640 | diff -Naur gcc-4.4.0.orig/libgfortran/intrinsics/bit_intrinsics.c gcc-4.4.0/libgfortran/intrinsics/bit_intrinsics.c |
| 19641 | --- gcc-4.4.0.orig/libgfortran/intrinsics/bit_intrinsics.c 1969-12-31 16:00:00.000000000 -0800 |
| 19642 | +++ gcc-4.4.0/libgfortran/intrinsics/bit_intrinsics.c 2009-06-03 12:39:09.000000000 -0700 |
| 19643 | @@ -0,0 +1,138 @@ |
| 19644 | +/* Implementation of the bit intrinsics not implemented as GCC builtins. |
| 19645 | + Copyright (C) 2009 Free Software Foundation, Inc. |
| 19646 | + |
| 19647 | +This file is part of the GNU Fortran runtime library (libgfortran). |
| 19648 | + |
| 19649 | +Libgfortran is free software; you can redistribute it and/or |
| 19650 | +modify it under the terms of the GNU General Public |
| 19651 | +License as published by the Free Software Foundation; either |
| 19652 | +version 3 of the License, or (at your option) any later version. |
| 19653 | + |
| 19654 | +Libgfortran is distributed in the hope that it will be useful, |
| 19655 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19656 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19657 | +GNU General Public License for more details. |
| 19658 | + |
| 19659 | +Under Section 7 of GPL version 3, you are granted additional |
| 19660 | +permissions described in the GCC Runtime Library Exception, version |
| 19661 | +3.1, as published by the Free Software Foundation. |
| 19662 | + |
| 19663 | +You should have received a copy of the GNU General Public License and |
| 19664 | +a copy of the GCC Runtime Library Exception along with this program; |
| 19665 | +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
| 19666 | +<http://www.gnu.org/licenses/>. */ |
| 19667 | + |
| 19668 | +#include "libgfortran.h" |
| 19669 | + |
| 19670 | + |
| 19671 | +#ifdef HAVE_GFC_INTEGER_16 |
| 19672 | +extern int clz128 (GFC_INTEGER_16); |
| 19673 | +export_proto(clz128); |
| 19674 | + |
| 19675 | +int |
| 19676 | +clz128 (GFC_INTEGER_16 x) |
| 19677 | +{ |
| 19678 | + int res = 127; |
| 19679 | + |
| 19680 | + // We can't write 0xFFFFFFFFFFFFFFFF0000000000000000, so we work around it |
| 19681 | + if (x & ((__uint128_t) 0xFFFFFFFFFFFFFFFF << 64)) |
| 19682 | + { |
| 19683 | + res -= 64; |
| 19684 | + x >>= 64; |
| 19685 | + } |
| 19686 | + |
| 19687 | + if (x & 0xFFFFFFFF00000000) |
| 19688 | + { |
| 19689 | + res -= 32; |
| 19690 | + x >>= 32; |
| 19691 | + } |
| 19692 | + |
| 19693 | + if (x & 0xFFFF0000) |
| 19694 | + { |
| 19695 | + res -= 16; |
| 19696 | + x >>= 16; |
| 19697 | + } |
| 19698 | + |
| 19699 | + if (x & 0xFF00) |
| 19700 | + { |
| 19701 | + res -= 8; |
| 19702 | + x >>= 8; |
| 19703 | + } |
| 19704 | + |
| 19705 | + if (x & 0xF0) |
| 19706 | + { |
| 19707 | + res -= 4; |
| 19708 | + x >>= 4; |
| 19709 | + } |
| 19710 | + |
| 19711 | + if (x & 0xC) |
| 19712 | + { |
| 19713 | + res -= 2; |
| 19714 | + x >>= 2; |
| 19715 | + } |
| 19716 | + |
| 19717 | + if (x & 0x2) |
| 19718 | + { |
| 19719 | + res -= 1; |
| 19720 | + x >>= 1; |
| 19721 | + } |
| 19722 | + |
| 19723 | + return res; |
| 19724 | +} |
| 19725 | +#endif |
| 19726 | + |
| 19727 | + |
| 19728 | +#ifdef HAVE_GFC_INTEGER_16 |
| 19729 | +extern int ctz128 (GFC_INTEGER_16); |
| 19730 | +export_proto(ctz128); |
| 19731 | + |
| 19732 | +int |
| 19733 | +ctz128 (GFC_INTEGER_16 x) |
| 19734 | +{ |
| 19735 | + int res = 0; |
| 19736 | + |
| 19737 | + if ((x & 0xFFFFFFFFFFFFFFFF) == 0) |
| 19738 | + { |
| 19739 | + res += 64; |
| 19740 | + x >>= 64; |
| 19741 | + } |
| 19742 | + |
| 19743 | + if ((x & 0xFFFFFFFF) == 0) |
| 19744 | + { |
| 19745 | + res += 32; |
| 19746 | + x >>= 32; |
| 19747 | + } |
| 19748 | + |
| 19749 | + if ((x & 0xFFFF) == 0) |
| 19750 | + { |
| 19751 | + res += 16; |
| 19752 | + x >>= 16; |
| 19753 | + } |
| 19754 | + |
| 19755 | + if ((x & 0xFF) == 0) |
| 19756 | + { |
| 19757 | + res += 8; |
| 19758 | + x >>= 8; |
| 19759 | + } |
| 19760 | + |
| 19761 | + if ((x & 0xF) == 0) |
| 19762 | + { |
| 19763 | + res += 4; |
| 19764 | + x >>= 4; |
| 19765 | + } |
| 19766 | + |
| 19767 | + if ((x & 0x3) == 0) |
| 19768 | + { |
| 19769 | + res += 2; |
| 19770 | + x >>= 2; |
| 19771 | + } |
| 19772 | + |
| 19773 | + if ((x & 0x1) == 0) |
| 19774 | + { |
| 19775 | + res += 1; |
| 19776 | + x >>= 1; |
| 19777 | + } |
| 19778 | + |
| 19779 | + return res; |
| 19780 | +} |
| 19781 | +#endif |
| 19782 | diff -Naur gcc-4.4.0.orig/libgfortran/io/fbuf.c gcc-4.4.0/libgfortran/io/fbuf.c |
| 19783 | --- gcc-4.4.0.orig/libgfortran/io/fbuf.c 2009-04-09 16:23:07.000000000 -0700 |
| 19784 | +++ gcc-4.4.0/libgfortran/io/fbuf.c 2009-05-26 18:21:22.000000000 -0700 |
| 19785 | @@ -28,8 +28,11 @@ |
| 19786 | #include <stdlib.h> |
| 19787 | |
| 19788 | |
| 19789 | +//#define FBUF_DEBUG |
| 19790 | + |
| 19791 | + |
| 19792 | void |
| 19793 | -fbuf_init (gfc_unit * u, size_t len) |
| 19794 | +fbuf_init (gfc_unit * u, int len) |
| 19795 | { |
| 19796 | if (len == 0) |
| 19797 | len = 512; /* Default size. */ |
| 19798 | @@ -37,14 +40,7 @@ |
| 19799 | u->fbuf = get_mem (sizeof (fbuf)); |
| 19800 | u->fbuf->buf = get_mem (len); |
| 19801 | u->fbuf->len = len; |
| 19802 | - u->fbuf->act = u->fbuf->flushed = u->fbuf->pos = 0; |
| 19803 | -} |
| 19804 | - |
| 19805 | - |
| 19806 | -void |
| 19807 | -fbuf_reset (gfc_unit * u) |
| 19808 | -{ |
| 19809 | - u->fbuf->act = u->fbuf->flushed = u->fbuf->pos = 0; |
| 19810 | + u->fbuf->act = u->fbuf->pos = 0; |
| 19811 | } |
| 19812 | |
| 19813 | |
| 19814 | @@ -56,58 +52,79 @@ |
| 19815 | if (u->fbuf->buf) |
| 19816 | free_mem (u->fbuf->buf); |
| 19817 | free_mem (u->fbuf); |
| 19818 | + u->fbuf = NULL; |
| 19819 | +} |
| 19820 | + |
| 19821 | + |
| 19822 | +static void |
| 19823 | +#ifdef FBUF_DEBUG |
| 19824 | +fbuf_debug (gfc_unit * u, const char * format, ...) |
| 19825 | +{ |
| 19826 | + va_list args; |
| 19827 | + va_start(args, format); |
| 19828 | + vfprintf(stderr, format, args); |
| 19829 | + va_end(args); |
| 19830 | + fprintf (stderr, "fbuf_debug pos: %d, act: %d, buf: ''", |
| 19831 | + u->fbuf->pos, u->fbuf->act); |
| 19832 | + for (int ii = 0; ii < u->fbuf->act; ii++) |
| 19833 | + { |
| 19834 | + putc (u->fbuf->buf[ii], stderr); |
| 19835 | + } |
| 19836 | + fprintf (stderr, "''\n"); |
| 19837 | +} |
| 19838 | +#else |
| 19839 | +fbuf_debug (gfc_unit * u __attribute__ ((unused)), |
| 19840 | + const char * format __attribute__ ((unused)), |
| 19841 | + ...) {} |
| 19842 | +#endif |
| 19843 | + |
| 19844 | + |
| 19845 | + |
| 19846 | +/* You should probably call this before doing a physical seek on the |
| 19847 | + underlying device. Returns how much the physical position was |
| 19848 | + modified. */ |
| 19849 | + |
| 19850 | +int |
| 19851 | +fbuf_reset (gfc_unit * u) |
| 19852 | +{ |
| 19853 | + int seekval = 0; |
| 19854 | + |
| 19855 | + if (!u->fbuf) |
| 19856 | + return 0; |
| 19857 | + |
| 19858 | + fbuf_debug (u, "fbuf_reset: "); |
| 19859 | + fbuf_flush (u, u->mode); |
| 19860 | + /* If we read past the current position, seek the underlying device |
| 19861 | + back. */ |
| 19862 | + if (u->mode == READING && u->fbuf->act > u->fbuf->pos) |
| 19863 | + { |
| 19864 | + seekval = - (u->fbuf->act - u->fbuf->pos); |
| 19865 | + fbuf_debug (u, "fbuf_reset seekval %d, ", seekval); |
| 19866 | + } |
| 19867 | + u->fbuf->act = u->fbuf->pos = 0; |
| 19868 | + return seekval; |
| 19869 | } |
| 19870 | |
| 19871 | |
| 19872 | /* Return a pointer to the current position in the buffer, and increase |
| 19873 | the pointer by len. Makes sure that the buffer is big enough, |
| 19874 | - reallocating if necessary. If the buffer is not big enough, there are |
| 19875 | - three cases to consider: |
| 19876 | - 1. If we haven't flushed anything, realloc |
| 19877 | - 2. If we have flushed enough that by discarding the flushed bytes |
| 19878 | - the request fits into the buffer, do that. |
| 19879 | - 3. Else allocate a new buffer, memcpy unflushed active bytes from old |
| 19880 | - buffer. */ |
| 19881 | + reallocating if necessary. */ |
| 19882 | |
| 19883 | char * |
| 19884 | -fbuf_alloc (gfc_unit * u, size_t len) |
| 19885 | +fbuf_alloc (gfc_unit * u, int len) |
| 19886 | { |
| 19887 | - size_t newlen; |
| 19888 | + int newlen; |
| 19889 | char *dest; |
| 19890 | + fbuf_debug (u, "fbuf_alloc len %d, ", len); |
| 19891 | if (u->fbuf->pos + len > u->fbuf->len) |
| 19892 | { |
| 19893 | - if (u->fbuf->flushed == 0) |
| 19894 | - { |
| 19895 | - /* Round up to nearest multiple of the current buffer length. */ |
| 19896 | - newlen = ((u->fbuf->pos + len) / u->fbuf->len + 1) * u->fbuf->len; |
| 19897 | - dest = realloc (u->fbuf->buf, newlen); |
| 19898 | - if (dest == NULL) |
| 19899 | - return NULL; |
| 19900 | - u->fbuf->buf = dest; |
| 19901 | - u->fbuf->len = newlen; |
| 19902 | - } |
| 19903 | - else if (u->fbuf->act - u->fbuf->flushed + len < u->fbuf->len) |
| 19904 | - { |
| 19905 | - memmove (u->fbuf->buf, u->fbuf->buf + u->fbuf->flushed, |
| 19906 | - u->fbuf->act - u->fbuf->flushed); |
| 19907 | - u->fbuf->act -= u->fbuf->flushed; |
| 19908 | - u->fbuf->pos -= u->fbuf->flushed; |
| 19909 | - u->fbuf->flushed = 0; |
| 19910 | - } |
| 19911 | - else |
| 19912 | - { |
| 19913 | - /* Most general case, flushed != 0, request doesn't fit. */ |
| 19914 | - newlen = ((u->fbuf->pos - u->fbuf->flushed + len) |
| 19915 | - / u->fbuf->len + 1) * u->fbuf->len; |
| 19916 | - dest = get_mem (newlen); |
| 19917 | - memcpy (dest, u->fbuf->buf + u->fbuf->flushed, |
| 19918 | - u->fbuf->act - u->fbuf->flushed); |
| 19919 | - u->fbuf->act -= u->fbuf->flushed; |
| 19920 | - u->fbuf->pos -= u->fbuf->flushed; |
| 19921 | - u->fbuf->flushed = 0; |
| 19922 | - u->fbuf->buf = dest; |
| 19923 | - u->fbuf->len = newlen; |
| 19924 | - } |
| 19925 | + /* Round up to nearest multiple of the current buffer length. */ |
| 19926 | + newlen = ((u->fbuf->pos + len) / u->fbuf->len + 1) * u->fbuf->len; |
| 19927 | + dest = realloc (u->fbuf->buf, newlen); |
| 19928 | + if (dest == NULL) |
| 19929 | + return NULL; |
| 19930 | + u->fbuf->buf = dest; |
| 19931 | + u->fbuf->len = newlen; |
| 19932 | } |
| 19933 | |
| 19934 | dest = u->fbuf->buf + u->fbuf->pos; |
| 19935 | @@ -118,42 +135,134 @@ |
| 19936 | } |
| 19937 | |
| 19938 | |
| 19939 | - |
| 19940 | +/* mode argument is WRITING for write mode and READING for read |
| 19941 | + mode. Return value is 0 for success, -1 on failure. */ |
| 19942 | |
| 19943 | int |
| 19944 | -fbuf_flush (gfc_unit * u, int record_done) |
| 19945 | +fbuf_flush (gfc_unit * u, unit_mode mode) |
| 19946 | { |
| 19947 | - int status; |
| 19948 | - size_t nbytes; |
| 19949 | + int nwritten; |
| 19950 | |
| 19951 | if (!u->fbuf) |
| 19952 | return 0; |
| 19953 | - if (u->fbuf->act - u->fbuf->flushed != 0) |
| 19954 | + |
| 19955 | + fbuf_debug (u, "fbuf_flush with mode %d: ", mode); |
| 19956 | + |
| 19957 | + if (mode == WRITING) |
| 19958 | { |
| 19959 | - if (record_done) |
| 19960 | - nbytes = u->fbuf->act - u->fbuf->flushed; |
| 19961 | - else |
| 19962 | - nbytes = u->fbuf->pos - u->fbuf->flushed; |
| 19963 | - status = swrite (u->s, u->fbuf->buf + u->fbuf->flushed, &nbytes); |
| 19964 | - u->fbuf->flushed += nbytes; |
| 19965 | + if (u->fbuf->pos > 0) |
| 19966 | + { |
| 19967 | + nwritten = swrite (u->s, u->fbuf->buf, u->fbuf->pos); |
| 19968 | + if (nwritten < 0) |
| 19969 | + return -1; |
| 19970 | + } |
| 19971 | } |
| 19972 | - else |
| 19973 | - status = 0; |
| 19974 | - if (record_done) |
| 19975 | - fbuf_reset (u); |
| 19976 | - return status; |
| 19977 | + /* Salvage remaining bytes for both reading and writing. This |
| 19978 | + happens with the combination of advance='no' and T edit |
| 19979 | + descriptors leaving the final position somewhere not at the end |
| 19980 | + of the record. For reading, this also happens if we sread() past |
| 19981 | + the record boundary. */ |
| 19982 | + if (u->fbuf->act > u->fbuf->pos && u->fbuf->pos > 0) |
| 19983 | + memmove (u->fbuf->buf, u->fbuf->buf + u->fbuf->pos, |
| 19984 | + u->fbuf->act - u->fbuf->pos); |
| 19985 | + |
| 19986 | + u->fbuf->act -= u->fbuf->pos; |
| 19987 | + u->fbuf->pos = 0; |
| 19988 | + |
| 19989 | + return 0; |
| 19990 | } |
| 19991 | |
| 19992 | |
| 19993 | int |
| 19994 | -fbuf_seek (gfc_unit * u, gfc_offset off) |
| 19995 | +fbuf_seek (gfc_unit * u, int off, int whence) |
| 19996 | { |
| 19997 | - gfc_offset pos = u->fbuf->pos + off; |
| 19998 | - /* Moving to the left past the flushed marked would imply moving past |
| 19999 | - the left tab limit, which is never allowed. So return error if |
| 20000 | - that is attempted. */ |
| 20001 | - if (pos < (gfc_offset) u->fbuf->flushed) |
| 20002 | + if (!u->fbuf) |
| 20003 | return -1; |
| 20004 | - u->fbuf->pos = pos; |
| 20005 | - return 0; |
| 20006 | + |
| 20007 | + switch (whence) |
| 20008 | + { |
| 20009 | + case SEEK_SET: |
| 20010 | + break; |
| 20011 | + case SEEK_CUR: |
| 20012 | + off += u->fbuf->pos; |
| 20013 | + break; |
| 20014 | + case SEEK_END: |
| 20015 | + off += u->fbuf->act; |
| 20016 | + break; |
| 20017 | + default: |
| 20018 | + return -1; |
| 20019 | + } |
| 20020 | + |
| 20021 | + fbuf_debug (u, "fbuf_seek, off %d ", off); |
| 20022 | + /* The start of the buffer is always equal to the left tab |
| 20023 | + limit. Moving to the left past the buffer is illegal in C and |
| 20024 | + would also imply moving past the left tab limit, which is never |
| 20025 | + allowed in Fortran. Similarly, seeking past the end of the buffer |
| 20026 | + is not possible, in that case the user must make sure to allocate |
| 20027 | + space with fbuf_alloc(). So return error if that is |
| 20028 | + attempted. */ |
| 20029 | + if (off < 0 || off > u->fbuf->act) |
| 20030 | + return -1; |
| 20031 | + u->fbuf->pos = off; |
| 20032 | + return off; |
| 20033 | +} |
| 20034 | + |
| 20035 | + |
| 20036 | +/* Fill the buffer with bytes for reading. Returns a pointer to start |
| 20037 | + reading from. If we hit EOF, returns a short read count. If any |
| 20038 | + other error occurs, return NULL. After reading, the caller is |
| 20039 | + expected to call fbuf_seek to update the position with the number |
| 20040 | + of bytes actually processed. */ |
| 20041 | + |
| 20042 | +char * |
| 20043 | +fbuf_read (gfc_unit * u, int * len) |
| 20044 | +{ |
| 20045 | + char *ptr; |
| 20046 | + int oldact, oldpos; |
| 20047 | + int readlen = 0; |
| 20048 | + |
| 20049 | + fbuf_debug (u, "fbuf_read, len %d: ", *len); |
| 20050 | + oldact = u->fbuf->act; |
| 20051 | + oldpos = u->fbuf->pos; |
| 20052 | + ptr = fbuf_alloc (u, *len); |
| 20053 | + u->fbuf->pos = oldpos; |
| 20054 | + if (oldpos + *len > oldact) |
| 20055 | + { |
| 20056 | + fbuf_debug (u, "reading %d bytes starting at %d ", |
| 20057 | + oldpos + *len - oldact, oldact); |
| 20058 | + readlen = sread (u->s, u->fbuf->buf + oldact, oldpos + *len - oldact); |
| 20059 | + if (readlen < 0) |
| 20060 | + return NULL; |
| 20061 | + *len = oldact - oldpos + readlen; |
| 20062 | + } |
| 20063 | + u->fbuf->act = oldact + readlen; |
| 20064 | + fbuf_debug (u, "fbuf_read done: "); |
| 20065 | + return ptr; |
| 20066 | +} |
| 20067 | + |
| 20068 | + |
| 20069 | +/* When the fbuf_getc() inline function runs out of buffer space, it |
| 20070 | + calls this function to fill the buffer with bytes for |
| 20071 | + reading. Never call this function directly. */ |
| 20072 | + |
| 20073 | +int |
| 20074 | +fbuf_getc_refill (gfc_unit * u) |
| 20075 | +{ |
| 20076 | + int nread; |
| 20077 | + char *p; |
| 20078 | + |
| 20079 | + fbuf_debug (u, "fbuf_getc_refill "); |
| 20080 | + |
| 20081 | + /* Read 80 bytes (average line length?). This is a compromise |
| 20082 | + between not needing to call the read() syscall all the time and |
| 20083 | + not having to memmove unnecessary stuff when switching to the |
| 20084 | + next record. */ |
| 20085 | + nread = 80; |
| 20086 | + |
| 20087 | + p = fbuf_read (u, &nread); |
| 20088 | + |
| 20089 | + if (p && nread > 0) |
| 20090 | + return (unsigned char) u->fbuf->buf[u->fbuf->pos++]; |
| 20091 | + else |
| 20092 | + return EOF; |
| 20093 | } |
| 20094 | diff -Naur gcc-4.4.0.orig/libgfortran/io/file_pos.c gcc-4.4.0/libgfortran/io/file_pos.c |
| 20095 | --- gcc-4.4.0.orig/libgfortran/io/file_pos.c 2009-04-09 16:23:07.000000000 -0700 |
| 20096 | +++ gcc-4.4.0/libgfortran/io/file_pos.c 2009-05-26 18:21:22.000000000 -0700 |
| 20097 | @@ -41,17 +41,17 @@ |
| 20098 | { |
| 20099 | gfc_offset base; |
| 20100 | char p[READ_CHUNK]; |
| 20101 | - size_t n; |
| 20102 | + ssize_t n; |
| 20103 | |
| 20104 | - base = file_position (u->s) - 1; |
| 20105 | + base = stell (u->s) - 1; |
| 20106 | |
| 20107 | do |
| 20108 | { |
| 20109 | n = (base < READ_CHUNK) ? base : READ_CHUNK; |
| 20110 | base -= n; |
| 20111 | - if (sseek (u->s, base) == FAILURE) |
| 20112 | + if (sseek (u->s, base, SEEK_SET) < 0) |
| 20113 | goto io_error; |
| 20114 | - if (sread (u->s, p, &n) != 0) |
| 20115 | + if (sread (u->s, p, n) != n) |
| 20116 | goto io_error; |
| 20117 | |
| 20118 | /* We have moved backwards from the current position, it should |
| 20119 | @@ -76,7 +76,7 @@ |
| 20120 | |
| 20121 | /* base is the new pointer. Seek to it exactly. */ |
| 20122 | done: |
| 20123 | - if (sseek (u->s, base) == FAILURE) |
| 20124 | + if (sseek (u->s, base, SEEK_SET) < 0) |
| 20125 | goto io_error; |
| 20126 | u->last_record--; |
| 20127 | u->endfile = NO_ENDFILE; |
| 20128 | @@ -95,10 +95,10 @@ |
| 20129 | static void |
| 20130 | unformatted_backspace (st_parameter_filepos *fpp, gfc_unit *u) |
| 20131 | { |
| 20132 | - gfc_offset m, new; |
| 20133 | + gfc_offset m, slen; |
| 20134 | GFC_INTEGER_4 m4; |
| 20135 | GFC_INTEGER_8 m8; |
| 20136 | - size_t length; |
| 20137 | + ssize_t length; |
| 20138 | int continued; |
| 20139 | char p[sizeof (GFC_INTEGER_8)]; |
| 20140 | |
| 20141 | @@ -109,9 +109,10 @@ |
| 20142 | |
| 20143 | do |
| 20144 | { |
| 20145 | - if (sseek (u->s, file_position (u->s) - length) == FAILURE) |