From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28861 invoked by alias); 27 Nov 2011 20:55:39 -0000 Received: (qmail 28851 invoked by uid 22791); 27 Nov 2011 20:55:38 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_SV X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 27 Nov 2011 20:55:22 +0000 From: "cestrauss at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/49084] [4.7 regression] bootstrap failure with Ada enabled Date: Sun, 27 Nov 2011 21:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: cestrauss at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg02592.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49084 --- Comment #11 from Cesar Strauss 2011-11-27 20:55:15 UTC --- Created attachment 25922 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25922 Debug log of PR49084 The cause of the access violation is due to an attempt to pass a null string pointer to asprintf in internal_error_function (gcc/ada/gcc-interface/misc.c:290): (gdb) frame 2 #2 0x0042bfad in internal_error_function (context=0x1a15800, msgid=0x11e08df "in %s, at %s:%d", ap=0x722faa4) at ../../../../gcc-svn-fixada/gcc/ada/gcc-interface/misc.c:290 290 asprintf (&loc, "%s:%d", s.file, s.line); (gdb) l 286 s = expand_location (input_location); 287 if (context->show_column && s.column != 0) 288 asprintf (&loc, "%s:%d:%d", s.file, s.line, s.column); 289 else 290 asprintf (&loc, "%s:%d", s.file, s.line); 291 temp_loc.Low_Bound = 1; 292 temp_loc.High_Bound = strlen (loc); 293 fp_loc.Bounds = &temp_loc; 294 fp_loc.Array = loc; (gdb) p input_location $1 = 0 (gdb) p s $2 = {file = 0x0, line = 0, column = 0, sysp = } It remains to be seen why input_location is zero. Maybe it's too early in the process execution? Earlier in the stack trace, there is an assertion triggered in gigi (ada/gcc-interface/trans.c:300): (gdb) fr 6 #6 0x00491875 in gigi (gnat_root=1707, max_gnat_node=2431, number_name=1656, nodes_ptr=0x7950020, next_node_ptr=0x78b52f8, prev_node_ptr=0x78e6050, elists_ptr=0x7708e78, elmts_ptr=0x77094d0, strings_ptr=0x7734818, string_chars_ptr=0x77320f0, list_headers_ptr=0x78a9760, number_file=3, file_info_ptr=0x722fb9c, standard_boolean=12, standard_integer=27, standard_character=72, standard_long_long_float=67, standard_exception_type=1281, gigi_operating_mode=0) at ../../../../gcc-svn-fixada/gcc/ada/gcc-interface/trans.c:300 300 gcc_assert (Nkind (gnat_root) == N_Compilation_Unit); (gdb) l 295 String_Chars_Ptr = string_chars_ptr; 296 List_Headers_Ptr = list_headers_ptr; 297 298 type_annotate_only = (gigi_operating_mode == 1); 299 300 gcc_assert (Nkind (gnat_root) == N_Compilation_Unit); 301 302 /* Declare the name of the compilation unit as the first global 303 name in order to make the middle-end fully deterministic. */ 304 t = create_concat_name (Defining_Entity (Unit (gnat_root)), NULL); (gdb) p gnat_root $3 = 1707 (gdb) p (Nodes_Ptr[(gnat_root) - 0].U.K.kind) $4 = 17 '\021' It seems Nkind (gnat_root) is N_Op_Add (17) for some reason. BTW this is trunk (svn 181738), with the stage 2 compiler (this bug is not manifest in the stage 1 compiler). Full debug log is attached.