This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/68358] New: Some tests in gfortran.dg fail when compiled with '-g -flto' and Xcode 7


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68358

            Bug ID: 68358
           Summary: Some tests in gfortran.dg fail when compiled with '-g
                    -flto' and Xcode 7
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dominiq at lps dot ens.fr
                CC: fxcoudert at gcc dot gnu.org, hubicka at gcc dot gnu.org,
                    iains at gcc dot gnu.org, mliska at suse dot cz
  Target Milestone: ---
              Host: x86_64-apple-darwin14
            Target: x86_64-apple-darwin14
             Build: x86_64-apple-darwin14

The following tests fail when compiled with '-g -flto' and Xcode 7

FAIL: gfortran.dg/alloc_comp_deep_copy_1.f03   -g -flto  (test for excess
errors)
FAIL: gfortran.dg/allocate_deferred_char_scalar_1.f03   -g -flto  (test for
excess errors)
FAIL: gfortran.dg/allocate_with_source_8.f08   -g -flto  (test for excess
errors)
FAIL: gfortran.dg/assumed_rank_2.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/class_48.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/class_optional_2.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/class_to_type_1.f03   -g -flto  (test for excess errors)
FAIL: gfortran.dg/class_to_type_4.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/defined_assignment_2.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/finalize_12.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/finalize_15.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/inline_transpose_1.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/intrinsic_spread_1.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/maxlocval_4.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/minlocval_3.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/minlocval_4.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/minmaxloc_3.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/namelist_69.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/namelist_70.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/realloc_on_assign_17.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/typebound_operator_9.f03   -g -flto  (test for excess errors)
FAIL: gfortran.dg/unlimited_polymorphic_1.f03   -g -flto  (test for excess
errors)
FAIL: gfortran.dg/vector_subscript_1.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/widechar_intrinsics_10.f90   -g -flto  (test for excess
errors)
FAIL: gfortran.dg/widechar_intrinsics_5.f90   -g -flto  (test for excess
errors)
FAIL: gfortran.dg/zero_sized_1.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/g77/f90-intrinsic-bit.f   -g -flto  (test for excess errors)
FAIL: gfortran.dg/ieee/large_3.F90   -g -flto  (test for excess errors)

plus with -m32 (not with -m64)

FAIL: gfortran.dg/achar_2.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/allocate_with_source_5.f90   -g -flto  (test for excess
errors)
FAIL: gfortran.dg/maxlocval_2.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/minlocval_1.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/minmaxloc_1.f90   -g -flto  (test for excess errors)
FAIL: gfortran.dg/ieee/ieee_1.F90   -g -flto  (test for excess errors)

plus with -m64 (not with -m32)

FAIL: gfortran.dg/bound_7.f90   -g -flto  (test for excess errors)

These failures are of the kind

warning: (i386)  could not find object file symbol for symbol
___x86.get_pc_thunk.ax

for gfortran.dg/achar_2.f90, maxlocval_2.f90, minlocval_1.f90 or more complex
as in

[Book15] f90/bug% gfc
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/allocate_with_source_5.f90 -g -flto
-m32
warning: (i386)  could not find object file symbol for symbol
___selectors_MOD___final_selectors_Selector_t
warning: (i386)  could not find object file symbol for symbol
___selectors_MOD___copy_selectors_Selector_t
...

These failures appear with

[Book15] f90/bug% dsymutil -v
Apple LLVM 7.0.0 (clang-700.1.76)

but I don't see them with

@(#)PROGRAM:dsymutil  PROJECT:dwarfutils-119

With the patch

--- ../_clean/gcc/testsuite/lib/prune.exp       2015-10-09 18:05:39.000000000
+0200
+++ gcc/testsuite/lib/prune.exp 2015-11-15 12:10:09.000000000 +0100
@@ -69,6 +69,9 @@ proc prune_gcc_output { text } {

     # Ignore harmless warnings from Xcode 4.0.
     regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind
for\[^\n\]*" $text "" text
+
+    # Ignore harmless warnings from Xcode 7.0.
+    regsub -all "(^|\n)warning: \[^\n\]* could not find object file symbol for
symbol\[^\n\]*" $text "" text

     # Call into multiline.exp to handle any multiline output directives.
     set text [handle-multiline-outputs $text]

these failures are gone.

Before reporting upstream, I'ld like to be sure that the issue is not due to
gfortran and/or lto: as shown by PRs 60061, 66238, and 66762, there are still
pending problems when mixing gfortran and -flto.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]