From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20997 invoked by alias); 24 Mar 2014 15:23:55 -0000 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 Received: (qmail 20975 invoked by uid 48); 24 Mar 2014 15:23:52 -0000 From: "vladimir.fuka at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/60635] New: ICE when mixing C and Fortran lto1: error: use operand missing for stmt Date: Mon, 24 Mar 2014 15:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vladimir.fuka at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg02155.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60635 Bug ID: 60635 Summary: ICE when mixing C and Fortran lto1: error: use operand missing for stmt Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: vladimir.fuka at gmail dot com The code is quite possibly non-standard or totally buggy, but prints the expected answer without -flto. bigend.c: #include #include static bool littleendian=true; uint16_t bigendc16(union{uint16_t * n;uint8_t* b;}x){ if (!littleendian) return *x.n; uint16_t res = ((uint16_t)(x.b[1])<<0) | ((uint16_t)(x.b[0])<<8); return res; } testbigend.f90: program test use iso_fortran_env interface integer(int16) function bigendc16(x) bind(C) import integer(int16), intent(in) :: x end function end interface integer(int16) :: x16 = 12345 x16 = bigendc16(x16) print *,x16 end program > gfortran-4.9 bigend.c testbigend.f90 -Ofast -flto In function 'bigendc16.constprop': lto1: error: use operand missing for stmt _13 # .MEM_15 = VDEF <.MEM_14(D)> x = VIEW_CONVERT_EXPR(_13); lto1: internal compiler error: verify_ssa failed 0xad59db verify_ssa(bool) ../../gcc-svn/gcc/tree-ssa.c:1096 0x88530c execute_function_todo ../../gcc-svn/gcc/passes.c:1854 0x885c33 execute_todo ../../gcc-svn/gcc/passes.c:1887 0x887ac1 execute_one_ipa_transform_pass ../../gcc-svn/gcc/passes.c:2076 0x887ac1 execute_all_ipa_transforms() ../../gcc-svn/gcc/passes.c:2107 0x887c51 apply_ipa_transforms ../../gcc-svn/gcc/passes.c:2121 0x885af1 do_per_function ../../gcc-svn/gcc/passes.c:1583 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. lto-wrapper: gfortran-4.9 returned 1 exit status /usr/bin/ld: lto-wrapper failed collect2: error: ld returned 1 exit status