GCC Bugzilla has been upgraded from version 4.4.9 to 5.0rc3. If you see any problem, please report it to bug 64968.
Bug 20548 - [4.3/4.4/4.5 regression] ACATS c52103x c52104x c52104y segfault
Summary: [4.3/4.4/4.5 regression] ACATS c52103x c52104x c52104y segfault
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.1.0
: P5 normal
Target Milestone: 4.5.0
Assignee: Eric Botcazou
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: wrong-code
: 25839 (view as bug list)
Depends on:
Blocks: 34118 4.4pending 37515
  Show dependency treegraph
 
Reported: 2005-03-19 08:03 UTC by Laurent GUERBY
Modified: 2010-02-17 20:50 UTC (History)
7 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-11-03 21:23:42


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent GUERBY 2005-03-19 08:03:20 UTC
It works on x86, on x86_64 it started failing on mainline between
LAST_UPDATED: Thu Mar 17 23:01:51 UTC 2005
LAST_UPDATED: Fri Mar 18 18:13:38 UTC 2005

,.,. C52103X ACATS 2.5 05-03-18 21:10:49
---- C52103X CHECK THAT IN ARRAY ASSIGNMENTS AND IN SLICE ASSIGNMENTS,
                THE LENGTHS MUST MATCH; ALSO CHECK WHETHER
                CONSTRAINT_ERROR OR STORAGE_ERROR ARE RAISED FOR LARGE
                ARRAYS.
   - C52103X NO CONSTRAINT_ERROR FOR TYPE WITH 'LENGTH = INTEGER'LAST + 
                3.
   - C52103X NO STORAGE_ERROR OR CONSTRAINT_ERROR RAISED WHEN ALLOCATING
                TWO BIG BOOLEAN ARRAYS.
/home/guerby/work/gcc/version-head/gcc/testsuite/ada/acats/run_all.sh: line 15:
 9036 Segmentation fault      $*
Comment 1 Andrew Pinski 2005-03-19 14:43:47 UTC
The following patches might be the cause:
+2005-03-18  Jan Hubicka  <jh@suse.cz>
+
+       PR middle-end/20225
+       * cgraph.c (cgraph_mark_reachable_node): Assert that it is not called
+       too late.
+       * varasm.c (find_decl_and_mark_needed): Mark needed only when not
+       called too late.
+
+2005-03-18  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * tree-into-ssa.c (find_idf): Use VEC_quick_push instead of
+       VEC_safe_push.
+
+2005-03-18  Paolo Bonzini  <bonzini@gnu.org>
+
+       * combine.c (gen_binary): Remove.
+       (known_cond, simplify_shift_const, find_split_point,
+       combine_simplify_rtx, simplify_if_then_else, simplify_set,
+       simplify_logical, expand_field_assignment, extract_left_shift,
+       force_to_mode, if_then_else_cond, apply_distributive_law,
+       simplify_and_const_int, simplify_shift_const, gen_lowpart_for_combine,
+       simplify_comparison, reversed_comparison): Replace with
+       simplify_gen_binary, simplify_gen_relational or
+       distribute_and_simplify_rtx.
+       (distribute_and_simplify_rtx): New function.
+


+
+       * tree-cfg.c (fold_cond_expr_cond): Use boolean types for condition.
+
+       * cgraph.c (cgraph_remove_node): Avoid loop in code deciding whether 
+       function body should be released; do not proactively release function
+       bodies in non-unit-at-a-time mode.
+

+2005-03-18  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * builtins.c (fold_builtin_bitop): Take decomposed arguments
+       of CALL_EXPR.
+       (fold_builtin_1): Update a call to fold_builtin_bitop.
+
+       * builtins.c (fold_builtin_signbit): Take decomposed arguments
+       of CALL_EXPR.
+       (fold_builtin_1): Update a call to fold_builtin_signbit.
+


Do you know if this happens on the 4.0 branch also, if it does not it removes the patch for "PR middle-
end/20225", otherwise that is the patch which caused it as no other patch went in both branches?

I almost this is caused by a copy and pasto with the combine patch.
Comment 2 Laurent GUERBY 2005-03-19 14:59:01 UTC
I haven't tested x86_64 on current 4.0, will try this weekend.
Comment 3 Eric Botcazou 2005-03-19 15:38:24 UTC
Uncovered by a front-end change.  Not sure it can work on 64-bit machines now.
Comment 4 Laurent GUERBY 2005-03-19 22:38:56 UTC
The bug is 4.1 only, it works on 4.0, consistent with front end problem.
Comment 5 Laurent GUERBY 2005-04-04 19:13:46 UTC
Same failure on 4.1.0 20050404 (experimental) (hppa-unknown-linux-gnu)
seen by J. David Anglin
Comment 6 Laurent GUERBY 2005-04-08 10:58:11 UTC
Same failure on 4.1.0 20050405 (experimental) powerpc64-suse-linux-gnu

http://gcc.gnu.org/ml/gcc-testresults/2005-04/msg00414.html
Comment 7 Laurent GUERBY 2005-06-11 23:10:12 UTC
Still there on 4.1 20050611 x86_64.
Comment 8 Andrew Pinski 2005-07-09 23:31:54 UTC
Fails on powerpc-darwin also on the mainline now.
Comment 9 Laurent GUERBY 2005-08-25 18:09:30 UTC
As of LAST_UPDATED: Thu Aug 25 10:17:37 UTC 2005
this test now pass on x86_64-linux.

Could people test on hppa and powerpc?

(I removed the target milestone since Ada is not release critical anyway)

Comment 10 Eric Botcazou 2005-08-29 13:38:49 UTC
This test will very likely be affected by a yet-to-be-merged front-end change. 
Therefore back to normal state.
Comment 11 Laurent GUERBY 2005-09-05 17:54:00 UTC
As of
LAST_UPDATED: Mon Sep  5 10:34:13 UTC 2005

The c52103x is now failing again (after the big commit), and c52104x c52104y now
fail in mostly the same way whereas the never failed before:

,.,. C52104X ACATS 2.5 05-09-05 14:26:05
---- C52104X CHECK THAT IN ARRAY ASSIGNMENTS AND IN SLICE ASSIGNMENTS,
                THE LENGTHS MUST MATCH; ALSO CHECK WHETHER
                CONSTRAINT_ERROR OR STORAGE_ERROR ARE RAISED FOR LARGE
                ARRAYS.
   - C52104X NO CONSTRAINT_ERROR FOR TYPE WITH 'LENGTH = INTEGER'LAST + 
                3.
/home/guerby/work/gcc/version-head/gcc/testsuite/ada/acats/run_all.sh: line 15:
 3394 Segmentation fault      $*

,.,. C52104Y ACATS 2.5 05-09-05 14:26:05
---- C52104Y CHECK THAT IN ARRAY ASSIGNMENTS AND IN SLICE ASSIGNMENTS,
                THE LENGTHS MUST MATCH.
   - C52104Y NO CONSTRAINT_ERROR FOR NON-NULL ARRAY SUBTYPE WHEN ONE
                DIMENSION HAS INTEGER'LAST + 3 COMPONENTS.
/home/guerby/work/gcc/version-head/gcc/testsuite/ada/acats/run_all.sh: line 15:
 3427 Segmentation fault      $*

Comment 12 Eric Botcazou 2005-09-05 18:04:41 UTC
> The c52103x is now failing again (after the big commit), and c52104x c52104y 
> now fail in mostly the same way whereas the never failed before:

It's actually a progress, the compiler was silently generating wrong code for
c52104x on all platforms, but that was not visible on Linux for some reasons.

All these tests now require -fstack-check to pass.
Comment 13 Laurent GUERBY 2005-09-05 19:09:59 UTC
Ok testing:

Index: stack.lst
===================================================================
RCS file: stack.lst
diff -N stack.lst
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ stack.lst   5 Sep 2005 19:08:30 -0000
@@ -0,0 +1,3 @@
+c52103x
+c52104x
+c52104y
Index: run_all.sh
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ada/acats/run_all.sh,v
retrieving revision 1.19
diff -u -r1.19 run_all.sh
--- run_all.sh  18 Apr 2005 17:32:56 -0000      1.19
+++ run_all.sh  5 Sep 2005 19:08:30 -0000
@@ -206,6 +206,7 @@
    counti=0
    for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
       counti=`expr $counti + 1`
+
       extraflags=""
       grep $i $testdir/overflow.lst > /dev/null 2>&1
       if [ $? -eq 0 ]; then
@@ -215,6 +216,11 @@
       if [ $? -eq 0 ]; then
          extraflags="$extraflags -gnatE"
       fi
+      grep $i $testdir/stack.lst > /dev/null 2>&1
+      if [ $? -eq 0 ]; then
+         extraflags="$extraflags -fstack-check"
+      fi
+
       test=$dir/tests/$chapter/$i
       mkdir $test && cd $test >> $dir/acats.log 2>&1

Comment 14 Laurent GUERBY 2005-09-05 22:20:35 UTC
-fstack-check doesn't seem to cure the problem, any idea?

Laurent

gnatmake --GCC="/home/guerby/work/gcc/build/build-20050905T211402/gcc/xgcc
-B/home/guerby/work/gcc/build/build-20050905T211402/gcc/" -gnatws -O2
-fstack-check
-I/home/guerby/work/gcc/build/build-20050905T211402/gcc/testsuite/ada/acats/support
c52103x.adb -largs
--GCC="/home/guerby/work/gcc/build/build-20050905T211402/gcc/xgcc
-B/home/guerby/work/gcc/build/build-20050905T211402/gcc/"
/home/guerby/work/gcc/build/build-20050905T211402/gcc/xgcc -c
-B/home/guerby/work/gcc/build/build-20050905T211402/gcc/ -gnatws -O2
-fstack-check
-I/home/guerby/work/gcc/build/build-20050905T211402/gcc/testsuite/ada/acats/support
c52103x.adb
gnatbind -aO./
-I/home/guerby/work/gcc/build/build-20050905T211402/gcc/testsuite/ada/acats/support
-I- -x c52103x.ali
gnatlink c52103x.ali -fstack-check
--GCC=/home/guerby/work/gcc/build/build-20050905T211402/gcc/xgcc
-B/home/guerby/work/gcc/build/build-20050905T211402/gcc/
RUN c52103x

,.,. C52103X ACATS 2.5 05-09-05 22:56:29
---- C52103X CHECK THAT IN ARRAY ASSIGNMENTS AND IN SLICE ASSIGNMENTS,
                THE LENGTHS MUST MATCH; ALSO CHECK WHETHER
                CONSTRAINT_ERROR OR STORAGE_ERROR ARE RAISED FOR LARGE
                ARRAYS.
   - C52103X NO CONSTRAINT_ERROR FOR TYPE WITH 'LENGTH = INTEGER'LAST + 
                3.

raised STORAGE_ERROR : stack overflow detected
FAIL:	c52103x
Comment 15 Eric Botcazou 2005-09-06 06:16:10 UTC
> -fstack-check doesn't seem to cure the problem, any idea?

Does it not at least prevent the segmentation faults?  Recovering from a
STORAGE_ERROR is another story and doesn't work very well with the FSF compiler.
Comment 16 Laurent GUERBY 2005-11-03 08:47:32 UTC
Started passing on x86-linux but still failing on x86_64 as of:
LAST_UPDATED: Wed Nov  2 22:35:36 UTC 2005 (revision 106403)
Comment 17 Laurent GUERBY 2005-11-14 07:47:03 UTC
Patch pending.
Comment 18 Eric Botcazou 2005-11-14 07:49:08 UTC
> Patch pending.

No, there is no possible patch.  They *have* to be compiled with -fstack-check.
Comment 19 Andrew Pinski 2006-01-18 03:44:01 UTC
*** Bug 25839 has been marked as a duplicate of this bug. ***
Comment 20 Eric Botcazou 2006-01-23 17:21:25 UTC
Subject: Bug 20548

Author: ebotcazou
Date: Mon Jan 23 17:21:18 2006
New Revision: 110131

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110131
Log:
	PR ada/20548
	* ada/acats/norun.lst: Add c52103x, c52104x and c52104y.
	* ada/acats/stackcheck.lst: New file, add c52103x, c52104x and c52104y.
	* ada/acats/run_all.sh: Pass -fstack-check for tests in stackcheck.lst.


Added:
    trunk/gcc/testsuite/ada/acats/stackcheck.lst
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/ada/acats/norun.lst
    trunk/gcc/testsuite/ada/acats/run_all.sh

Comment 21 Eric Botcazou 2006-01-23 17:22:45 UTC
Subject: Bug 20548

Author: ebotcazou
Date: Mon Jan 23 17:22:40 2006
New Revision: 110132

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110132
Log:
	PR ada/20548
	* ada/acats/norun.lst: Add c52103x, c52104x and c52104y.
	* ada/acats/stackcheck.lst: New file, add c52103x, c52104x and c52104y.
	* ada/acats/run_all.sh: Pass -fstack-check for tests in stackcheck.lst.


Added:
    branches/gcc-4_1-branch/gcc/testsuite/ada/acats/stackcheck.lst
Modified:
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/ada/acats/norun.lst
    branches/gcc-4_1-branch/gcc/testsuite/ada/acats/run_all.sh

Comment 22 Eric Botcazou 2006-01-23 17:59:26 UTC
Until after they are removed from the norun.lst file.
Comment 23 Eric Botcazou 2006-03-19 09:00:55 UTC
Patch in the works.
Comment 24 Christian Joensson 2007-02-20 13:10:13 UTC
(In reply to comment #23)
> Patch in the works.
> 

any progress?
Comment 25 Eric Botcazou 2007-02-20 13:11:24 UTC
> any progress?

See the 'Patch URL' field.
Comment 26 Samuel Tardieu 2007-12-05 18:57:45 UTC
Eric,

what is the status for this PR? Is there some work to do on your patch? Or is the issue moot?
Comment 27 Eric Botcazou 2007-12-05 19:02:30 UTC
> what is the status for this PR? Is there some work to do on your patch?

Commit it after approval. :-)
Comment 28 Joseph S. Myers 2008-03-15 00:39:56 UTC
Update milestone after 4.3.0 release.
Comment 29 Richard Biener 2008-06-06 14:56:47 UTC
4.3.1 is being released, adjusting target milestone.
Comment 30 Joseph S. Myers 2008-07-04 19:49:56 UTC
Mark properly as regression again.
Comment 31 Eric Botcazou 2008-08-16 18:42:19 UTC
Subject: Bug 20548

Author: ebotcazou
Date: Sat Aug 16 18:40:57 2008
New Revision: 139159

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139159
Log:
	PR ada/20548
	* common.opt (-fstack-check): Do not declare the variable here.
	(-fstack-check=): New option variant.
	* doc/invoke.texi (Code Gen Options): Document it.
	* expr.h (STACK_OLD_CHECK_PROTECT): New macro.
	(STACK_CHECK_PROTECT): Bump to 3 pages if DWARF-2 EH is used.
	(STACK_CHECK_STATIC_BUILTIN): New macro.
	* doc/tm.texi (Stack Checking): Document STACK_CHECK_STATIC_BUILTIN.
	* opts.c: Include expr.h.
	(common_handle_option) <OPT_fold_stack_check_>: New case.
	<OPT_fstack_check>: Likewise.
	* calls.c (initialize_argument_information): Use TYPE_SIZE_UNIT
	consistently in the test for variable-sized types.  Adjust for
	new behaviour of flag_stack_check.
	* explow.c: Include except.h.
	(allocate_dynamic_stack_space): Do not take into account
	STACK_CHECK_MAX_FRAME_SIZE for static builtin stack checking.
	* function.c (gimplify_parameters): Use DECL_SIZE_UNIT in the test
	for variable-sized parameters.  Treat all parameters whose size is
	greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized if generic
	stack checking is enabled.
	* gimplify.c (gimplify_decl_expr): Treat non-static objects whose
	size is greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized
	if generic stack checking is enabled.
	(expand_function_end): Adjust for new behaviour of flag_stack_check.
	* reload1.c (reload): Likewise.
	* stmt.c (expand_decl): Assert that all automatic variables have
	fixed size at this point and remove dead code.
	* flags.h (stack_check_type): New enumeration type.
	(flag_stack_check): Declare.
	* toplev.c (flag_stack_check): New global variable.
	* Makefile.in (opts.o): Add dependency on EXPR_H.
	(explow.o): Add dependency on except.h.
ada/
	* gcc-interface/decl.c (gnat_to_gnu_entity): Use DECL_SIZE_UNIT in the
	setjmp test consistently.  Adjust for new behaviour of flag_stack_check.
	* gcc-interface/utils2.c (build_call_alloc_dealloc): Remove redundant
	test of flag_stack_check.  Adjust for new behaviour of flag_stack_check.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/gcc-interface/decl.c
    trunk/gcc/ada/gcc-interface/utils2.c
    trunk/gcc/calls.c
    trunk/gcc/common.opt
    trunk/gcc/doc/invoke.texi
    trunk/gcc/doc/tm.texi
    trunk/gcc/explow.c
    trunk/gcc/expr.h
    trunk/gcc/flags.h
    trunk/gcc/function.c
    trunk/gcc/gimplify.c
    trunk/gcc/opts.c
    trunk/gcc/reload1.c
    trunk/gcc/stmt.c
    trunk/gcc/toplev.c

Comment 32 Joseph S. Myers 2008-08-27 22:01:21 UTC
4.3.2 is released, changing milestones to 4.3.3.
Comment 33 Richard Biener 2009-01-24 10:19:28 UTC
GCC 4.3.3 is being released, adjusting target milestone.
Comment 34 Paolo Bonzini 2009-02-03 14:02:09 UTC
Is this still a 4.4 regression?
Comment 35 Steven Bosscher 2009-06-04 12:58:19 UTC
This bug is marked as one of the "GCC 4.5 pending patches" PRs. Why?  I see no pending patch...?
Comment 36 Eric Botcazou 2009-06-04 13:24:13 UTC
> This bug is marked as one of the "GCC 4.5 pending patches" PRs. Why?  I see no
> pending patch...?

They are at AdaCore for the time being.  Will need to submit them...
Comment 37 Richard Biener 2009-08-04 12:26:17 UTC
GCC 4.3.4 is being released, adjusting target milestone.
Comment 38 Eric Botcazou 2009-11-03 22:49:54 UTC
Subject: Bug 20548

Author: ebotcazou
Date: Tue Nov  3 22:49:37 2009
New Revision: 153877

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153877
Log:
	PR target/10127
	PR ada/20548
	* expr.h (STACK_CHECK_PROBE_INTERVAL): Delete.
	(STACK_CHECK_PROBE_INTERVAL_EXP): New macro.
	(STACK_CHECK_MOVING_SP): Likewise.
	* system.h (STACK_CHECK_PROBE_INTERVAL): Poison it.
	* doc/tm.texi (Stack Checking): Delete STACK_CHECK_PROBE_INTERVAL.
	Document STACK_CHECK_PROBE_INTERVAL_EXP and STACK_CHECK_MOVING_SP.
	* doc/md.texi (Standard Pattern Names): Tweak entry of CHECK_STACK.
	Document PROBE_STACK.
	* explow.c (anti_adjust_stack_and_probe): New function.
	(allocate_dynamic_stack_space): Do not directly allocate space if
	STACK_CHECK_MOVING_SP, instead invoke above function.
	(emit_stack_probe): Handle probe_stack insn.
	(PROBE_INTERVAL): New macro.
	(STACK_GROW_OPTAB): Likewise.
	(STACK_GROW_OFF): Likewise.
	(probe_stack_range): Use Pmode and memory_address consistently.  Fix
	loop condition in the small constant case.  Rewrite in the general
	case to be immune to wraparounds.  Make sure the address of probes
	is valid.  Try to use [base + disp] addressing mode if possible.
	* ira.c (setup_eliminable_regset): Set frame_pointer_needed if stack
	checking is enabled and STACK_CHECK_MOVING_SP.
	* rtlanal.c (may_trap_p_1) <MEM>: If stack checking is enabled,
	return 1 for volatile references to the stack pointer.
	* tree.c (build_common_builtin_nodes): Do not set ECF_NOTHROW on
	__builtin_alloca if stack checking is enabled.
	* unwind-dw2.c (uw_identify_context): Take into account whether the
	context is that of a signal frame or not.
	* config/i386/linux.h (STACK_CHECK_MOVING_SP): Define to 1.
	* config/i386/linux64.h (STACK_CHECK_MOVING_SP): Likewise.

Added:
    trunk/gcc/testsuite/gnat.dg/stack_check1.adb
    trunk/gcc/testsuite/gnat.dg/stack_check2.adb
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/linux.h
    trunk/gcc/config/i386/linux64.h
    trunk/gcc/doc/md.texi
    trunk/gcc/doc/tm.texi
    trunk/gcc/explow.c
    trunk/gcc/expr.h
    trunk/gcc/ira.c
    trunk/gcc/rtlanal.c
    trunk/gcc/system.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree.c
    trunk/gcc/unwind-dw2.c

Comment 39 Eric Botcazou 2009-11-04 21:46:06 UTC
Subject: Bug 20548

Author: ebotcazou
Date: Wed Nov  4 21:45:54 2009
New Revision: 153918

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153918
Log:
	PR target/10127
	PR ada/20548
	* config/i386/i386.md (probe_stack_range): New expander.
	(logical operation peepholes): Do not split stack checking probes.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.md
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/ada/acats/norun.lst
    trunk/gcc/testsuite/ada/acats/run_acats

Comment 40 Eric Botcazou 2009-11-04 21:49:40 UTC
Tentatively on mainline.
Comment 41 Ludovic Brenta 2009-11-07 09:45:51 UTC
As I understand it, there is still a patch pending for i386?

Does anyone plan to backport this patch into gcc-4_4-branch?

I am considering applying this patch (up to r153918) in Debian's
gnat-4.4.  Before I do that, I'd like to know whether this would break
ABI compatibility. Consider the following scenario:

gnat-4.4 uploaded without the patch (this is the present situation)
libfoo.so.1 built with -fstack-check
gnat-4.4 updated with the patch (hypothetical situation)
libbar.so.1 built with -fstack-check, links against libfoo.so.1
frobnicate built with -fstack-check, links against libfoo.so.1
shazaam built with -fstack-check, links against libbar.so.1

Will stack checking work in libbar.so.1, frobnicate and shazaam?
Is it necessary to rebuild libfoo.so.1?
Is it necessary to rebuild anything depending on libfoo.so.1?

Thanks for all the hard work!
Comment 42 Eric Botcazou 2009-11-07 10:05:10 UTC
> As I understand it, there is still a patch pending for i386?

Yes, the current stack checking method is not bullet-proof and can fail to detect stack overflows; a warning should be issued in that case though.  The enhanced method indeed requires another patch for the x86 back-end, that I plan to resubmit for 4.5 once I've fixed the optimization bug exhibited by a few ACATS tests.

> Does anyone plan to backport this patch into gcc-4_4-branch?

No, no plan to backport this as far as I'm concerned.  Note that some support code is needed in the Ada runtime (init.c, see the comments).

> I am considering applying this patch (up to r153918) in Debian's
> gnat-4.4.  Before I do that, I'd like to know whether this would break
> ABI compatibility. Consider the following scenario:

-fstack-check is broken with GCC 4.4 on x86/x86-64 Linux, it generates code that will easily segfault so I doubt compatibility really matters.  In any case, -fstack-check doesn't change the ABI.
Comment 43 Eric Botcazou 2009-11-10 11:24:17 UTC
Subject: Bug 20548

Author: ebotcazou
Date: Tue Nov 10 11:23:54 2009
New Revision: 154061

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154061
Log:
	PR ada/20548
	* explow.c (probe_stack_range): Fix typo.
	* config/sparc/sparc.md (probe_stack): New expander.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sparc/sparc.md
    trunk/gcc/explow.c

Comment 44 Eric Botcazou 2009-11-10 12:38:10 UTC
Subject: Bug 20548

Author: ebotcazou
Date: Tue Nov 10 12:37:56 2009
New Revision: 154063

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154063
Log:
	PR ada/20548
	* system-linux-alpha.ads (Stack_Check_Probes): Set to true.
	* system-linux-hppa.ads (Stack_Check_Probes): Likewise.
	* system-linux-sparc.ads (Stack_Check_Probes): Likewise.
	* system-linux-sparcv9.ads (Stack_Check_Probes): Likewise.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/system-linux-alpha.ads
    trunk/gcc/ada/system-linux-hppa.ads
    trunk/gcc/ada/system-linux-sparc.ads
    trunk/gcc/ada/system-linux-sparcv9.ads

Comment 45 Eric Botcazou 2009-11-10 20:45:43 UTC
Subject: Bug 20548

Author: ebotcazou
Date: Tue Nov 10 20:45:25 2009
New Revision: 154079

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154079
Log:
	PR target/10127
	PR ada/20548
	* expr.h (anti_adjust_stack_and_probe): Declare.
	* explow.c (anti_adjust_stack_and_probe): Make global, add ADJUST_BACK
	parameter and rewrite head comment.
	(allocate_dynamic_stack_space): Adjust call to above function.
	* function.c (expand_function_end): Handle STACK_CHECK_MOVING_SP.

	* tree.h (dwarf2out_args_size): Delete.
	* dwarf2out.c (dwarf2out_args_size): Make static and move around.
	(dwarf2out_args_size_adjust): Delete prototype and move around.
	(dwarf2out_frame_debug_expr): Do not record arg size adjustments for
	ACCUMULATE_OUTGOING_ARGS targets.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c
    trunk/gcc/explow.c
    trunk/gcc/expr.h
    trunk/gcc/function.c
    trunk/gcc/tree.h

Comment 46 Eric Botcazou 2009-11-25 19:55:45 UTC
Subject: Bug 20548

Author: ebotcazou
Date: Wed Nov 25 19:55:11 2009
New Revision: 154650

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154650
Log:
	PR target/10127
	PR ada/20548
	PR middle-end/42004
	* dwarf2out.c (dwarf2out_args_size_adjust): Rename to...
	(dwarf2out_stack_adjust): ...this.  Do not adjust the arg size for
	ACCUMULATE_OUTGOING_ARGS targets.  Rename former version to...
	(dwarf2out_notice_stack_adjust): ...this.  Adjust for above renaming.
	(dwarf2out_frame_debug_expr): Revert previous change and adjust for
	above renaming.
	(dwarf2out_frame_debug): Add ??? comment.  Adjust for above renaming.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c