public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/102865] New: gcc-12.0 HEAD fails to compile on x86_64 Darwin: unknown machine mode ‘HF’
@ 2021-10-21  2:50 alpha+gcc at alphaservcomputing dot solutions
  2021-10-21  3:06 ` [Bug bootstrap/102865] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: alpha+gcc at alphaservcomputing dot solutions @ 2021-10-21  2:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102865
           Summary: gcc-12.0 HEAD fails to compile on x86_64 Darwin:
                    unknown machine mode ‘HF’
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alpha+gcc at alphaservcomputing dot solutions
  Target Milestone: ---

Created attachment 51639
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51639&action=edit
Attempted (not very elegant) fix

Latest GCC fails to build since 3ccb523bdd78e6ba3c133064be90cdf19dcbf896 on
MacOS x86_64 without HF.

Configuration:
`./configure --with-system-zlib --disable-bootstrap --with-newlib
--disable-multiarch --disable-multilib --enable-languages=fortran --disable-lto
--with-native-system-header-dir=/usr/include
--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk`
(CFLAGS/CPPFLAGS: `-fexceptions -Wformat -Werror=format-security
-mmacosx-version-min=10.12
-fdebug-prefix-map=/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/src=.
-I/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/buildenv/include
-O2 -Wno-error=format-security -fno-exceptions -Wfatal-errors`)

Build Failure:
```
/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/src/host-x86_64-apple-darwin18.7.0/gcc/xgcc
-B/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/src/host-x86_64-apple-darwin18.7.0/gcc/
-B/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/root/x86_64-apple-darwin18.7.0/bin/
-B/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/root/x86_64-apple-darwin18.7.0/lib/
-isystem
/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/root/x86_64-apple-darwin18.7.0/include
-isystem
/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/root/x86_64-apple-darwin18.7.0/sys-include

-fdebug-prefix-map=/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/src=.
 -g -fexceptions -Wformat -Werror=format-security -mmacosx-version-min=10.12
-fdebug-prefix-map=/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/src=.
-I/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/buildenv/include
-O2 -Wno-error=format-security -fno-exceptions -Wfatal-errors -O2  -g
-fexceptions -Wformat -Werror=format-security -mmacosx-version-min=10.12
-fdebug-prefix-map=/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/src=.
-I/private/var/folders/0s/n3s60vpj3xlb2k5v7yv9vc0c0000gq/T/qbws-xein9n_m/buildenv/include
-O2 -Wno-error=format-security -fno-exceptions -Wfatal-errors -DIN_GCC    -W
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag
-Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag
-Wold-style-definition  -isystem ./include   -mmacosx-version-min=10.8
-fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  
-mmacosx-version-min=10.8 -fno-common -I. -I.
-I../../host-x86_64-apple-darwin18.7.0/gcc -I../.././libgcc -I../.././libgcc/.
-I../.././libgcc/../gcc -I../.././libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS
-o sfp-exceptions_s.o -MT sfp-exceptions_s.o -MD -MP -MF sfp-exceptions_s.dep
-DSHARED  -c ../.././libgcc/config/i386/sfp-exceptions.c
In file included from ../.././libgcc/config/i386/sfp-exceptions.c:25:
../.././libgcc/config/i386/sfp-machine.h:82:1: error: unknown machine mode ‘HF’
   82 | typedef float alias_HFtype __attribute__ ((mode (HF)));
      | ^~~~~~~
compilation terminated due to -Wfatal-errors.
make[2]: *** [sfp-exceptions_s.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-target-libgcc] Error 2
make: *** [all] Error 2
```

System:
```
$ uname -a
Darwin mac-build-003 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14
PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64

$ sysctl -a | grep machdep.cpu
machdep.cpu.max_basic: 22
machdep.cpu.max_ext: 2147483656
machdep.cpu.vendor: GenuineIntel
machdep.cpu.brand_string: Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
machdep.cpu.family: 6
machdep.cpu.model: 158
machdep.cpu.extmodel: 9
machdep.cpu.extfamily: 0
machdep.cpu.stepping: 10
machdep.cpu.feature_bits: 9221960262849657855
machdep.cpu.leaf7_feature_bits: 43806655 1073741824
machdep.cpu.leaf7_feature_bits_edx: 2617254912
machdep.cpu.extfeature_bits: 1241984796928
machdep.cpu.signature: 591594
machdep.cpu.brand: 0
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA
CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ
DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC
MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C
machdep.cpu.leaf7_features: RDWRFSGS TSC_THREAD_OFFSET SGX BMI1 HLE AVX2 SMEP
BMI2 ERMS INVPCID RTM FPU_CSDS MPX RDSEED ADX SMAP CLFSOPT IPT SGXLC MDCLEAR
TSXFA IBRS STIBP L1DF SSBD
machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW RDTSCP
TSCI
machdep.cpu.logical_per_package: 16
machdep.cpu.cores_per_package: 8
machdep.cpu.microcode_version: 180
machdep.cpu.processor_flag: 5
machdep.cpu.mwait.linesize_min: 64
machdep.cpu.mwait.linesize_max: 64
machdep.cpu.mwait.extensions: 3
machdep.cpu.mwait.sub_Cstates: 286531872
machdep.cpu.thermal.sensor: 1
machdep.cpu.thermal.dynamic_acceleration: 1
machdep.cpu.thermal.invariant_APIC_timer: 1
machdep.cpu.thermal.thresholds: 2
machdep.cpu.thermal.ACNT_MCNT: 1
machdep.cpu.thermal.core_power_limits: 1
machdep.cpu.thermal.fine_grain_clock_mod: 1
machdep.cpu.thermal.package_thermal_intr: 1
machdep.cpu.thermal.hardware_feedback: 0
machdep.cpu.thermal.energy_policy: 1
machdep.cpu.xsave.extended_state: 31 832 1088 0
machdep.cpu.xsave.extended_state1: 15 832 256 0
machdep.cpu.arch_perf.version: 4
machdep.cpu.arch_perf.number: 8
machdep.cpu.arch_perf.width: 48
machdep.cpu.arch_perf.events_number: 7
machdep.cpu.arch_perf.events: 0
machdep.cpu.arch_perf.fixed_number: 3
machdep.cpu.arch_perf.fixed_width: 48
machdep.cpu.cache.linesize: 64
machdep.cpu.cache.L2_associativity: 4
machdep.cpu.cache.size: 256
machdep.cpu.tlb.inst.large: 8
machdep.cpu.tlb.data.small: 64
machdep.cpu.tlb.data.small_level1: 128
machdep.cpu.address_bits.physical: 39
machdep.cpu.address_bits.virtual: 48
machdep.cpu.core_count: 6
machdep.cpu.thread_count: 6
machdep.cpu.tsc_ccc.numerator: 250
machdep.cpu.tsc_ccc.denominator: 2
```

Patch that caused the regression:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3ccb523bdd78e6ba3c133064be90cdf19dcbf896

Attached is a [not-very elegant] fix (macro hell makes this hard).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/102865] gcc-12.0 HEAD fails to compile on x86_64 Darwin: unknown machine mode ‘HF’
  2021-10-21  2:50 [Bug bootstrap/102865] New: gcc-12.0 HEAD fails to compile on x86_64 Darwin: unknown machine mode ‘HF’ alpha+gcc at alphaservcomputing dot solutions
@ 2021-10-21  3:06 ` pinskia at gcc dot gnu.org
  2021-10-21  3:09 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-21  3:06 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-10-21
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
HFmode should be supported:
static bool
ix86_scalar_mode_supported_p (scalar_mode mode)
{
  if (DECIMAL_FLOAT_MODE_P (mode))
    return default_decimal_float_supported_p ();
  else if (mode == TFmode)
    return true;
  else if (mode == HFmode && TARGET_SSE2)
    return true;
  else
    return default_scalar_mode_supported_p (mode);
}


SSE2 is default on for x86_64.

Are you sure that the first compiler is not miscompiling the new one?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/102865] gcc-12.0 HEAD fails to compile on x86_64 Darwin: unknown machine mode ‘HF’
  2021-10-21  2:50 [Bug bootstrap/102865] New: gcc-12.0 HEAD fails to compile on x86_64 Darwin: unknown machine mode ‘HF’ alpha+gcc at alphaservcomputing dot solutions
  2021-10-21  3:06 ` [Bug bootstrap/102865] " pinskia at gcc dot gnu.org
@ 2021-10-21  3:09 ` pinskia at gcc dot gnu.org
  2021-10-21  3:35 ` alpha+gcc at alphaservcomputing dot solutions
  2021-10-21  3:41 ` alpha+gcc at alphaservcomputing dot solutions
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-21  3:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also these configure options seems odd:
--with-newlib --disable-lto

Why set CFLAGS/CPPFLAGS also?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/102865] gcc-12.0 HEAD fails to compile on x86_64 Darwin: unknown machine mode ‘HF’
  2021-10-21  2:50 [Bug bootstrap/102865] New: gcc-12.0 HEAD fails to compile on x86_64 Darwin: unknown machine mode ‘HF’ alpha+gcc at alphaservcomputing dot solutions
  2021-10-21  3:06 ` [Bug bootstrap/102865] " pinskia at gcc dot gnu.org
  2021-10-21  3:09 ` pinskia at gcc dot gnu.org
@ 2021-10-21  3:35 ` alpha+gcc at alphaservcomputing dot solutions
  2021-10-21  3:41 ` alpha+gcc at alphaservcomputing dot solutions
  3 siblings, 0 replies; 5+ messages in thread
From: alpha+gcc at alphaservcomputing dot solutions @ 2021-10-21  3:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Heather A <alpha+gcc at alphaservcomputing dot solutions> ---
Ha, okay. I figured it out. It was totally bad on my side.

https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7cbc870c495cebc61f5d0ebb975856c207a42fab
resolved this issue.

I was going insane trying to figure out why ix86_scalar_mode_supported_p did
not have a case like you just pointed out, but it was because this was actually
off of gcc 11.2 with some backported functionality (from Iain Sandoe's Darwin
aarch64 work).
I thought it reproduced clearly on master, but I guess I messed up that test.

Well, that's embarrassing. Thanks! And sorry about that!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug bootstrap/102865] gcc-12.0 HEAD fails to compile on x86_64 Darwin: unknown machine mode ‘HF’
  2021-10-21  2:50 [Bug bootstrap/102865] New: gcc-12.0 HEAD fails to compile on x86_64 Darwin: unknown machine mode ‘HF’ alpha+gcc at alphaservcomputing dot solutions
                   ` (2 preceding siblings ...)
  2021-10-21  3:35 ` alpha+gcc at alphaservcomputing dot solutions
@ 2021-10-21  3:41 ` alpha+gcc at alphaservcomputing dot solutions
  3 siblings, 0 replies; 5+ messages in thread
From: alpha+gcc at alphaservcomputing dot solutions @ 2021-10-21  3:41 UTC (permalink / raw)
  To: gcc-bugs

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

Heather A <alpha+gcc at alphaservcomputing dot solutions> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|WAITING                     |RESOLVED

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-21  3:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21  2:50 [Bug bootstrap/102865] New: gcc-12.0 HEAD fails to compile on x86_64 Darwin: unknown machine mode ‘HF’ alpha+gcc at alphaservcomputing dot solutions
2021-10-21  3:06 ` [Bug bootstrap/102865] " pinskia at gcc dot gnu.org
2021-10-21  3:09 ` pinskia at gcc dot gnu.org
2021-10-21  3:35 ` alpha+gcc at alphaservcomputing dot solutions
2021-10-21  3:41 ` alpha+gcc at alphaservcomputing dot solutions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).