[Bug driver/109762] [AArch64] gcc/config/aarch64/aarch64-builtins.cc: mismatched sizes for flags variables

2023-05-06 Thread davem at devkitpro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109762

--- Comment #1 from Dave Murphy  ---
Created attachment 55014
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55014=edit
proposed patch

[Bug driver/109762] New: [AArch64] gcc/config/aarch64/aarch64-builtins.cc: mismatched sizes for flags variables

2023-05-06 Thread davem at devkitpro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109762

Bug ID: 109762
   Summary: [AArch64] gcc/config/aarch64/aarch64-builtins.cc:
mismatched sizes for flags variables
   Product: gcc
   Version: 13.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: driver
  Assignee: unassigned at gcc dot gnu.org
  Reporter: davem at devkitpro dot org
  Target Milestone: ---

Created attachment 55013
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55013=edit
preprocessed source that fails

On windows and 32 bit hosts int and long are 32bit while aarch64_feature_flags
is 64bit. This causes compilation failures on windows & 32bit hosts. The
attached source fails with a spurious inlining failed in call to
'always_inline'  'unsigned int GetConstant()': target specific option mismatch.

[Bug libstdc++/100017] [11/12 regression] error: 'fenv_t' has not been declared in '::' -- cross toolchain fails to build

2021-06-29 Thread davem at devkitpro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017

--- Comment #17 from Dave Murphy  ---
(In reply to Jonathan Wakely from comment #16)
> I don't think the patch is sufficient, I think I had a complete one.

Shall I leave this or submit the patch I made as a starting point for review?

[Bug c++/100296] New: [10.x regression] offsetof with non-constant-expression offset no longer accepted in C++ mode

2021-04-27 Thread davem at devkitpro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100296

Bug ID: 100296
   Summary: [10.x regression] offsetof with
non-constant-expression offset no longer accepted in
C++ mode
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: davem at devkitpro dot org
  Target Milestone: ---

The following code compiles fine as C but produces " error: 'idx' is not a
constant expression" with gcc 11.1.0

#include 
#include 

struct foo
{
uint8_t things[12];
};

uintptr_t getThing(const unsigned idx)
{
return offsetof(struct foo, things[idx]);
}

The code compiles fine with gcc 6.x through 10.x

gcc 5.x says "error: 'idx' cannot appear in a constant-expression"

[Bug libstdc++/100017] error: 'fenv_t' has not been declared in '::' x86_64-w64-mingw32 host cross toolchain fails to build

2021-04-25 Thread davem at devkitpro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017

--- Comment #12 from Dave Murphy  ---
Naive patch based on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017#c7
gets my canadian crosses building. 

diff --git a/libstdc++-v3/include/c_compatibility/fenv.h
b/libstdc++-v3/include/c_compatibility/fenv.h
index 0413e3b7c25..56cabaa3635 100644
--- a/libstdc++-v3/include/c_compatibility/fenv.h
+++ b/libstdc++-v3/include/c_compatibility/fenv.h
@@ -26,6 +26,10 @@
  *  This is a Standard C++ Library header.
  */

+#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+# include_next 
+#else
+
 #ifndef _GLIBCXX_FENV_H
 #define _GLIBCXX_FENV_H 1

diff --git a/libstdc++-v3/include/c_global/cfenv
b/libstdc++-v3/include/c_global/cfenv
index 0b0ec35a837..d24cb1a3c81 100644
--- a/libstdc++-v3/include/c_global/cfenv
+++ b/libstdc++-v3/include/c_global/cfenv
@@ -37,9 +37,11 @@

 #include 

-#if _GLIBCXX_HAVE_FENV_H
-# include 
-#endif
+// Need to ensure this finds the C library's  not a libstdc++
+// wrapper that might already be installed later in the include search path.
+#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+#include_next 
+#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS

 #ifdef _GLIBCXX_USE_C99_FENV_TR1